{'fraction_non_alphanumeric': 0.04416319860137202, 'fraction_numerical': 0.013435189935959562, 'mean_word_length': 4.679257500539607, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Dynamic Modularity Approach to Adaptive Inner/Outer Loop Control of Robotic Systems

Modern applications of robotics typically involve a robot control system with an inner PI (proportional-integral) or PID (proportional-integral-derivative) control loop and an outer user-specified control loop. The existing outer loop controllers, however, do not take into consideration the dynamic effects of robots and their effectiveness relies on the ad hoc assumption that the inner PI or PID control loop is fast enough, and other torque-based control algorithms cannot be implemented in robotics with closed architecture. This paper investigates the adaptive control of robotic systems with an inner/outer loop structure, taking into full account the effects of the dynamics and the system uncertainties, and both the task-space control and joint-space control are considered. We propose a dynamic modularity approach to resolve this issue, and a class of adaptive outer loop control schemes is proposed and their role is to dynamically generate the joint velocity (or position) command for the low-level joint servoing loop. Without relying on the ad hoc assumption that the joint servoing is fast enough or the modification of the low-level joint controller structure, we rigorously show that the proposed outer loop controllers can ensure the stability and convergence of the closed-loop system. We also propose the outer loop versions of several standard joint-space direct/composite adaptive controllers for rigid or flexible-joint robots, and a promising conclusion may be that most torque-based adaptive controllers for robots can be designed to fit the inner/outer loop structure by using the new definition of the joint velocity (or position) command. Simulation results are provided to show the performance of various adaptive outer loop controllers, using a three-DOF (degree-of-freedom) manipulator, and experiment results using the UR10 robotic system are also presented.


I. INTRODUCTION
User-friendliness is an important aspect of modern automatic machines, especially if they are expected to do extensive work in cooperation with human beings. The control systems for modern robotic systems, unfortunately, have not yet reach this expectation though numerous control algorithms have been developed over the past several decades. To serve this purpose, the controlled robotic system might have to be reliable, robust, and flexible to satisfy the user's needs. As we take a deep look at the development of computers (for instance, the recent hybrid computers-Surface Pro 4, iPad Pro, etc.), the module design plays a vital role in promoting their success in our everyday life. The relationship between the operating systems (e.g., the Windows System) and the application programs further validates the desirability of this module design philosophy.
Historically, the applications of robotics have undergone the following phases: 1) Traditional industrial applications-factory automation in a structured environment with a simple joint-space PID (proportional-integral-derivative) inner loop control as well as inverse kinematics; H. Wang  2) Modern applications-beyond factory automation in an unstructured environment with sensory feedback in the task space, e.g., (outer loop) visual servoing and task-space control, which, however, either cannot be implemented in robotics with closed architecture or rely on the ad hoc assumption that the combination of the inner and outer loops is stable and the effect of the dynamics can be neglected. This ad hoc assumption typically (approximately) holds only on the occasion that the given task is slow enough.
The inner/outer loop structure of robotic systems (e.g., most commercial robotic systems) enjoys certain module design flavor and has some desirable properties, e.g., it is beneficial for generating a high joint stiffness by employing a fast inner joint servoing while it is not reliable as directly specifying the control torque due to the limitation of the communication (generally required for exerting a coupling control action) reliability. For this reason, the gap between the study of advanced robot control theory and practical applications is longstanding. In the academic field, most advanced controller designs are torque-based and typically require an open torque control loop. In practical applications, the much more reliable and robust velocity control mode is adopted. It seems necessary here to recall the standard inner/outer loop structure of most commercial (industrial) robotic systems: 1) an outer (kinematic) loop using a centralized computer with enough computing power; 2) an inner dynamic loop that consists of n independent processors equipped at each joint in a decentralized way (i.e., each processor only receives/sends signals from/to its local sensors, actuator, and the centralized computer). The inner dynamic loop usually evolves at a much faster sampling than the outer (kinematic) loop.
The attempts that aim to address the control of this kind of robotic systems in the task space occur in, e.g., [1], [2], [3], [4]. However, these controllers cannot ensure the tracking error convergence without significantly modifying the low-level PI (proportional-integral) controller to be a more complex one. One may note that these control algorithms are all based on the standard resolved motion rate control proposed by [5] to design the joint velocity command. Then what actually prevents the application of advanced robot controllers? Let us first retrospect the realization of the standard computed torque controller that has been discussed in [6, p. 209, p. 210] (see also the trajectory precorrection based on the computed torque feedforward in [7]). The specific procedure in [6] is to modify the terms in the feedforward action that may involve coupling by replacing certain signals (positions or velocities) with their desired values. In this way, no communication between the joint processors at the dynamic servoing loop is required since the desired values of all the joints are stored in each joint's computer a priori (which would, on the other hand, mean that this algorithm is not flexible in the case that the desired trajectory is subjected to changes). The overall impression is that for the sake of reducing computational burden, this scheme performs the feedforward at the joint control loop in a relatively limited manner and with many nonlinear terms being neglected. Another important well-recognized reason is that most commercial/industrial robotic systems do not have an open torque control loop (see, e.g., [8]). These two factors give rise to the awkward situation of the modern torque-based robot control algorithms (e.g., the adaptive algorithms in [9], [10], [11], [12], [13], [14], [15] and the robust algorithms in [16], [17]), i.e., it is hard to apply these algorithms to robotic systems with an inner/outer loop structure. The precorrection scheme in [7], by producing a trajectory correction term based on the inverse manipulator dynamics and then adding it to the desired joint trajectory, improves the performance of the industrial robotic system without modifying the low-level controller structure. The main proofs of the performance improvement, however, are by the experimental results rather than by the rigorous analysis.
In this paper, we rigorously address this issue in the context of adaptive task-space/joint-space control for robotic systems with an embedded low-level PI joint velocity controller (or PID joint position controller) and with uncertain dynamics (and kinematics). The use of PI velocity controller or PID position controller in most industrial/commercial robotic systems is well recognized (see, e.g., [18], [19]). Our main purpose here is to develop a class of adaptive outer loop controllers that can ensure the stability and convergence of the robotic systems with the dynamic effect being taken into full account and without modifying the embedded inner PI or PID control loop. The application of the current adaptive (or robust) task-space regulation/tracking algorithms (e.g., [20], [21], [12], [13], [15], [22], [23], [14], [24], [25]) to robotic systems with an inner/outer loop structure, for a long period, relies on the ad hoc assumption that the inner joint servoing loop is fast enough or the modification of the inner joint controller structure. A preliminary version of the paper was presented in [26] where the simultaneous opening of the position and velocity commands is required. We here extend this preliminary result to address the case that only the position (or velocity) command is designable (which is considered to be much more common in most industrial/commercial robots), and to additionally consider the case of composite adaptation and joint flexibility as well as include the experimental results.
We first propose two adaptive task-space regulation controllers that rule out the fundamental limitations of the existing results, by dynamically incorporating an adaptively scaled dynamic compensation that exploits the physically independent nature of the lowlevel controller structure. The first controller, by introducing an adaptive filter, avoids the task-space velocity measurement, and the second one avoids the use of the task-space velocity by using an observer [motivated by the one in [27] with a modified feedback gain (which depends on the estimated Jacobian matrix) to achieve feedback separation]. Both of the adaptive controllers are qualified outer loop control schemes that can be applied to robotic systems with an unmodifiable joint servoing controller (PI velocity or PID position controller) (e.g., most industrial/commercial robots), taking into account the dynamic loop of the robotic systems. From a robot control perspective, most existing kinematic algorithms are not mathematically rigorous in that either the effects of the inner joint control loop are not considered (e.g., [28], [29], [30]), or the low-level joint servoing controller is assumed to be strong enough to ensure (yet cannot rigorously guarantee due to the absence of dynamic compensation action in the low-level dynamic loop) the square-integrability and boundedess of the velocity tracking error (e.g., [31], [32]), or even the modification of the low-level controller structure (e.g., [1], [2], [3]). These limitations are mainly caused by the inner/outer loop structure and closed controller architecture. The proposed outer loop controller here, by dynamically incorporating adaptively scaled dynamic compensation action and adaptive transpose Jacobian feedback, ensures the singularity-robust stability and convergence of the task-space position error without relying on any modification of the low-level PI/PID controller structure. Due to the independence of the design of the outer loop controller and that of the low-level PI/PID controller and the injection of the dynamic compensation, the proposed design approach is referred to as dynamic modularity approach.
We then show that the observer-based task-space regulation scheme can be extended to the case of task-space tracking. The obtained control scheme has an interesting feature that the inverse of the estimated Jacobian matrix is used for introducing feedforward and its transpose is used for introducing feedback, in contrast to most q q x c c q q Fig. 1. Inner/outer loop control (qc is the position command,qc is the velocity command, and q,q, and x are the joint position, joint velocity, and task-space position, respectively). existing task-space algorithms that only employ the inverse of the Jacobian matrix to exert feedforward and feedback actions (see, e.g., [9], [33], [21], [14]), and the benefit of this lies in two folds: 1) it yields the feedback separation of the kinematic and dynamic loops, thus reducing the activity of the dynamic compensation action; 2) it is reducible in the sense that once the desired task-space velocity becomes zero, the tracking control law reduces to the regulation control law without involving the inverse of the estimated Jacobian matrix.
Finally, we illustrate how the adaptively scaled dynamic compensation enables several typical adaptive robot controllers for jointspace trajectory tracking to be applicable to robotic systems with an inner/outer loop structure (e.g., most industrial/commercial robotic systems). In particular, the proposed dynamic modularity approach is further shaped to incorporate the composite adaptation for improving performance and to address the issue of joint flexibility. By these additional examples, it seems hopeful that most adaptive dynamic controllers for robots in the literature with the use of adaptively scaled dynamic compensation and new definition of the joint velocity (or position) command would be rendered to be qualified outer loop schemes. Another potential favorable point may be the reduction of the cost of the laboratory experimental research on advanced robot control theory in that there no longer needs to develop a specific manipulator with an open torque control loop (usually requiring extensive efforts and time) and any commercial robot (cost-efficient due to the large-scale production) can be directly used.

A. Background and Motivation
Inner/outer loop control is typical in modern applications of robotic systems (see Fig. 1), and generally the inner loop is designed by the robot production company and closed and only the outer loop is open to the user. The user can specify the position or velocity command within the outer loop based on measurements in joint space [and task space (e.g., image space)], which is then sent to the inner loop as a reference signal. The main benefit of adopting an inner/outer loop structure may be that the inner loop (due to simplicity) can be operated at a high sampling rate and thus a high stiffness can be maintained, and that the outer loop can be operated at a low sampling rate allowing relatively complicated communication and sensing. In addition, inner/outer loop structure does help to realize the relative independence of the manipulator production company and the users, and to promote the large-scale production of manipulators due to the invariance of the inner control loop.
Historically, most theoretical results on adaptive manipulator control are presented in the context that the joint torque is directly designable rather than in the framework of the inner/outer loop. This results in the longstanding gap between the study of advanced robot control theory and the applications of robots. The existing results (e.g., [1], [2], [3], [7], [28], [29], [30]) are either ad hoc, e.g., effective under the assumption that the joint servoing is fast enough, relying on the modification of the low-level controller structure which is unmodifiable in practice, or not theoretically rigorous.
Our main purpose is to develop a class of adaptive outer loop controllers using the task-space and joint-space sensory measurement (instead of obtaining the task-space information based on the kinematics as in Fig. 1 since the kinematics is unknown) to take place of the kinematic planner in Fig. 1 so that the stability and convergence of the closed-loop robotic systems with uncertain dynamics (and kinematics) can rigorously be ensured, and to finally approach the goal of "modularity".

B. Manipulator Kinematics and Dynamics
Consider an n-DOF (degree-of-freedom) manipulator actuated by permanent magnet DC motors. Let x ∈ R m be the position of the end-effector in the task space and it is relevant to the joint position by the following nonlinear mapping [34], [35] x = f (q) (1) where q ∈ R n denotes the joint position and f : R n → R m is the mapping from joint space to task space. We here assume that n ≥ m, i.e., the manipulator can either be nonredundant or redundant. Differentiating (1) with respect to time yields the relation between the task-space velocityẋ and joint velocityq [34], [35] x = J(q)q (2) where J(q) ∈ R m×n is the Jacobian matrix. If the kinematic parameters are unknown, the task-space position/velocity can no longer be derived by the direct kinematics given above. The typical practice in this case is to employ certain task-space sensors (e.g., a camera) to obtain the task-space position information.
The dynamics of the manipulator can be written as [35] M (q)q + C(q,q)q + Bq + g(q) = Ku where M (q) ∈ R n×n is the inertia matrix, C(q,q) ∈ R n×n is the Coriolis and centrifugal matrix, B ∈ R n×n is a constant diagonal positive definite matrix, g(q) ∈ R n is the gravitational torque, u ∈ R n is the armature voltage, and K ∈ R n×n is a constant diagonal positive definite matrix. Four basic properties associated with (2) and (3) that shall be useful for the controller design and stability analysis are listed as follows.
Property 1 ( [21]): The kinematics (2) depends linearly on a constant kinematic parameter vector a k , which gives rise to where ψ ∈ R n is a vector and Y k (q, ψ) is the kinematic regressor matrix. Property 2 ( [36], [35]): The inertia matrix M (q) is symmetric and uniformly positive definite.
Property 4 ( [36], [35]): The dynamics (3) depends linearly on a constant dynamic parameter vector a d , which yields where ζ ∈ R n is a differentiable vector,ζ is the time derivative of ζ, and Y d (q,q, ζ,ζ) is the dynamic regressor matrix.

III. ADAPTIVE INNER/OUTER LOOP CONTROL
Kinematic control typically appears in the context of inner/outer loop control of robot manipulators and its focus is on the design of the joint velocity (or position) command. Historically, the effectiveness of kinematic control stands on the relatively strong assumption that the inner control (PI velocity control or PID position control) loop is fast enough so that the dynamic effects of the inner loop can be neglected. Here, we present a dynamic modularity approach to ensure the convergence of the task-space position error, without relying on this ad hoc assumption or the modification of the inner control loop.
Let x d ∈ R m denote the desired task-space position. For the regulation problem, it is set as constant; for the tracking problem, it can be set as time-varying and in this case, we assume that x d ,ẋ d , andẍ d are all bounded.

A. Filter-Based Adaptive Regulation Control
Consider the case that the inner control loop employs a PI velocity control, and the PI gains of the inner PI velocity control loop (the case of PID position control is discussed in Sec. III-D) are supposed to be KP and KI (diagonal and positive definite). Then, the PI action can be written as To avoid the task-space velocity measurement, we introduce the following adaptive passive filteṙ upon which, we define the joint reference velocity aṡ where ∆x = x − x d , K1 and K2 are diagonal positive definite matrices, andĴ (q) is the estimate of the Jacobian matrix J(q) and is obtained by replacing a k in J(q) with its estimateâ k . Define a sliding vector s =q −qr.
Remark 1: The introduction of the adaptive scalesŵ andŵI is to accommodate the uncertain diagonal matrices K * = KKP and K −1 P KI , and their uncertainty comes from both the actuator model and low-level controller design (generally performed by the robot production company). The part due to the actuator model (i.e., K) is inherently uncertain and may possibly be subjected to slow variation. The uncertainty of the part due to the low-level controller design (i.e., KP and KI ) is a business strategy for protecting the intellectual property right and thus it is and will be impossible to be disclosed thoroughly in the short run. In addition, the adaptive scalê w used here is computationally efficient and free of computational singularity since it does not involve the computation of inverse of an estimated quantity (which, however, would be encountered if we directly estimate the matrix K * ). Similar techniques for handling the uncertainty of the diagonal torque-constant matrix (which describes the relation between the torque and current) appear in the context of adaptive control for rigid-link electrically-driven robots or robots with actuator uncertainty, yet with an open controller structure (i.e., the voltage can be directly specified by the user) [38], [11].
Remark 2: The uniform positive definiteness ofKP can be conveniently ensured by using the projection algorithms [39], and the full row rank ofĴ (q) can be ensured by the assumption of being away from the singular configuration and the use of the projection algorithms [21], [13].
Remark 3: The adaptive filter (7) with K1Ĵ T (q)∆x as the input can be considered as an extension of [40] to address the avoidance of task-space velocity measurement in the context of adaptive task-space control. Clearly, the joint velocity command given by (11) no longer involves the task-space velocity measurement sinceqr = −K2ẏ anḋ y given by (7) does not involve the task-space velocity.

B. Observer-Based Adaptive Regulation Control
The task-space observer is given aṡ where xo ∈ R m denotes the observed quantity of x, ∆xo = xo − x, and β is a positive design constant, and the joint reference velocitẏ qr is now defined asq where γ is a positive design constant. The observer (21) is motivated by [27] yet with a new feedback gain βĴ(q)Ĵ T (q) for the purpose of achieving feedback separation, and the idea behind is that the actual joint velocity finally approaches the joint reference velocityqr and thusĴ(q)qr would approach the estimated task-space velocityĴ (q)q.
The desirable point is that the observer no longer depends on the joint velocity and is thus not influenced by the noise of the velocity signal. The joint velocity command is defined aṡ which no longer needs the scaled dynamic compensation action The adaptation laws forâ k andŵ are given aṡ The adaptation laws forâ d andŵI remain the same as (16) and (17), respectively.
Combining (21) and (2) and using Property 1 yields By premultiplying s =q −qr withĴ(q) and using Property 1, we obtainĴ Therefore, at the outer loop, we obtain We are presently ready to formulate the following theorem. Theorem 2: Suppose thatKI is uniformly positive definite and J(q) has full row rank, and let the controller parameters β and γ be chosen such that β > 4γ/9.
The adaptive outer loop controller given by (23), (12), (21), (24), (25), (16), and (17) withqr being given as (22) for the robotic system (2) and (3) under the inner PI controller (6) ensures the stability of the system and convergence of the task-space position error, i.e., ∆x → 0 as t → ∞. Proof: Substituting (6), (23), and (12) into (3) and using Property 4 gives Consider the Lyapunov-like function candidate whose derivative with respect to time along the trajectories of (31), (25), (16), and (17) can be written aṡ where we have used Property 3. This directly gives the conclusion that s ∈ L2 ∩ L∞, t 0 s(r)dr ∈ L∞,ŵ ∈ L∞,â d ∈ L∞, and wI ∈ L∞. Then, there exists a positive constant ℓM such that t 0 s T (σ)s(σ)dσ ≤ ℓM , ∀t ≥ 0. Let us now consider the following quasi-Lyapunov function candidate with the choice of the last term following the typical practice (see, e.g., [41, p. 118]), and the derivative of V * * along the trajectories of (28), (29), and (24) can be written aṡ Using the following results derived from the standard basic inequalities we obtain from (35) thaṫ due to the positive definiteness of Q in the case that β > 4γ/9, where In is the n × n identity matrix. Then using similar procedures as in the proof of Theorem 1, we can show the stability of the system [regardless of the estimated Jacobian matrixĴ(q)] and the convergence of ∆x and ∆xo. Remark 4: The existing adaptive (or robust) task-space regulation algorithms either assume the exact knowledge of the gravitational torques [21], [12], or require the careful choice of the controller parameters [20], [42], [22], or encounter the overparametrization problem [22]. Furthermore, many adaptive visual tracking schemes (e.g., [21], [24], [14], [25]) have also been proposed, yet the necessity of investigating task-space regulation algorithms is due to the consideration that the choice of specific controllers should take into account the properties of the specific tasks. It is well accepted that given a specific task, the control law should be as (computationally) simple as possible; while the adaptive tracking controllers can also achieve the regulation of the task-space position to the desired one (constant), it is not cost-effective to rely on such kind of complexity (usually involves the inverse of the estimated Jacobian and the singularity issues) for regulation tasks. The two adaptive regulation controllers presented here rule out the limitations of the above results, and in addition the proposed controllers can be applied to robotic systems with an inner/outer loop structure (e.g., most industrial/commercial robotic systems) that have an unmodifiable joint servoing controller but admit the design of the joint velocity (or position) command, benefiting from the dynamic feedback design and the use of the adaptively scaled dynamic compensation action.

C. Extension to Task-Space Tracking
In the case of task-space tracking, a feedforward action needs to be introduced in the definition of the joint reference velocity. Specifically we defineqr aṡ (39) where the use of the generalized inverse ofĴ(q) follows the typical practice. The definition given by (39) extends the one in [31] to address the case of no task-space velocity measurement. The interesting point here is that both the inverse and transpose ofĴ(q) are incorporated, and one is for introducing a feedforward action and the other for introducing a feedback action. This is in contrast to most existing task-space control algorithms that rely on the use of the inverse of the (estimated) Jacobian matrix to exert both the feedforward and feedback actions (see, e.g., [9], [33], [14]). As can be clearly observed, once the desired task-space velocity becomes zero,qr in (39) reduces to the one defined by (22), and this means that the regulation and tracking cases are unified.
Theorem 3: Suppose thatKI is uniformly positive definite and J(q) has full row rank, and let the controller parameters β and γ be chosen such that β > 4γ/9.
The adaptive outer loop controller given by (23), (12), (21), (24), (25), (16), and (17) withqr being given as (39) for the robotic system (2) and (3) under the inner PI controller (6) ensures the stability of the system and convergence of the task-space tracking errors, i.e., ∆x → 0 and ∆ẋ → 0 as t → ∞. The proof of Theorem 3 can be straightforwardly completed based on that of Theorem 2, and the major difference lies in the fact that equation (29) for the case of regulation problem now becomes By an analysis of the system given by (28), (41), and (24), we can derive the stability of the system and convergence of the task-space tracking errors.
Remark 5: The filter-based adaptive regulation algorithm is computationally simpler in comparison with the observer-based one. But the main issue of the filter-based algorithm is that it is difficult to quantitatively evaluate the performance. Here the observer-based algorithm is extended to cover the case of task-space tracking by additionally introducing feedforward based on the generalized inverse of the estimated Jacobian matrix [see (39)]. The extension of the filter-based algorithm to realize the task-space tracking can be completed in a similar way.

D. Task-Space Adaptive Control With an Inner PID Position Controller
We here investigate another case that the low-level controller takes the PID position control action, i.e., (42) where KD, KP , and KI are the derivative, proportional, and integral gains (diagonal and positive definite), respectively. In this case, to ensure the stability and convergence of the robotic system, we need to make some modifications. We take the filter-based adaptive regulation control in Sec. III-A as an illustrating example and the other controllers can be similarly formulated. Specifically, we define two quantities belowq * with qr being generated bẏ where Kc is a diagonal positive definite matrix. Let KP = K −1 D KP and KI = K −1 D KI and denote byKP andKI the estimate of KP and that of KI , respectively, which are specifically written aŝ withŵP andŵI being n-dimensional vectors. The joint velocity command for the low-level PID controller is defined aṡ The adaptation laws forŵ,â d ,ŵP , andŵI are now given aṡ and ΛP and ΛI being diagonal positive definite matrices, and the adaptation law forâ k is still the same as (14).
With these modifications and using the fact that q − qr = t 0 s(σ)dσ + δ0, equation (18) becomes whereK * = KKD. The above equation can further be written as Consider the Lyapunov function candidate where By suitably choosing Kc, we can ensure that M is positive semidef-inite. The derivative of V can be written aṡ Theorem 4: Suppose thatKP andKI evolve such that the following systemz +KPż +KI z = 0 with z ∈ R n is uniformly exponentially stable and thatĴ(q) has full row rank, and choose the matrix Kc such that M given by (57) is positive semidefinite. Then the adaptive outer loop controller given by (48) (2) and (3) under the inner PID position controller (42) ensures the stability of the system and convergence of the task-space position error, i.e., ∆x → 0 as t → ∞.
The proof of Theorem 4 can be completed by following similar steps as in the proof of Theorem 1. where kD,ii is the i-th diagonal entry of KD, kP,ii is the i-th diagonal entry of KP , and kI,ii is the i-th diagonal entry of KI . Here we face the similar situation as the control engineers of the robot production company. The control engineers are usually careful about the choice of the integral gain and large gain may cause instability; a trade-off has to be made between the attenuation of constant disturbances and the stability margin of the control system. In practice, kP,ii and kD,ii are possibly/generally chosen to be not less than kI,ii, and in this case, we can simply choose kc,ii as kc,ii ≥ ( √ 5 − 1)/2, ∀i = 1, . . . , n.
2) An important issue in proving Theorem 4 is to clarify the inputoutput properties of the following system [derived from (48)] where the right side is bounded. The main issue can now be reduced to investigating the stability of the linear timevarying system (59). By the assumption that the system (59) is uniformly exponentially stable, we can directly obtain from (61) that On the other hand, by the standard projection algorithms [39], we can conveniently ensure thatKP andKI are uniformly positive. In addition, the boundedness ofKP andKI is a direct consequence of that of the Lyapunov function candidate given by (56). But even under these two conditions, we still cannot ensure the uniform exponential stability of (59) [which is a sufficient condition to ensure the uniform bounded-input bounded-output stability of (61) according to the standard linear system theory] since the coefficient matrices are time-varying. In practice, we may slow down the adaptation to KP and KI (i.e., slow down the variation ofKP andKI ) so that the system (59) is a slowly time-varying (or quasi-time-invariant) linear system.

IV. GENERALIZATIONS AND FURTHER DISCUSSIONS
Let us now discuss the proposed framework in other closely related topics concerning adaptive robot control.

A. Direct Adaptation
The first result that we would like to discuss is the well-known Slotine and Li adaptive controller [9] and the result there is presented in the context of open joint torque control. If we redefineqr in (22) asq with q d ∈ R n being the desired joint position andᾱ a positive design constant, then the adaptive controller given by (23), (12), (15), (16), and (17) withqr being defined by (62) becomes an outer loop ("applicable") version of Slotine and Li adaptive controller suitable for practical robotic systems (without opening the torque control module) with an unmodifiable inner PI velocity control loop (in the case of an inner PID position controller, its outer loop version can be similarly developed by following the steps in Sec. III-D). In this case of the joint-space position tracking, one can easily show that the position command qc = q d is also qualified for ensuring the stability of the robotic system and convergence of the joint tracking errors.

B. Composite Adaptation
The implementation of the standard composition adaptation algorithm given in [43] in the framework of inner/outer controller structure seems not straightforward and we need to ensure that no additional number of parameters appear in the filtered dynamic model (i.e., avoiding the overparameterization). For this purpose, we rewrite the dynamics (3) as diag[wi, i = 1, . . . , n][M (q)q + C(q,q)q + Bq + g(q)] and by using the filtering technique in [43], we then have the following equation without involving joint acceleration measurement with p and λ f > 0 being the Laplace variable and the filter parameter, respectively. Letû * whereŵI is the estimate of wI = [wI,1, . . . , wI,n] T . Then we define a prediction error and the composite adaptive version of (15), (16), and (17) is given asẇ where γ0 is a positive design constant. Remark 7: The interesting and also distinguished point here is that the prediction error e f given by (66) contains the unknown coefficient matrix diag[w], due to which the regressor matrix is actually only partially known. This motivates us to wonder whether or not the stability of the closed-loop robotic system can still be guaranteed under the composite adaptation here.
Consider the nonnegative function (70) whose derivative along (67), (68), and (69) can be written aṡ where the first three terms are used to compensate for the indefinite terms due to the parametric uncertainty, and in this way, the stability is ensured. The key point here is to exploit the independent nature of the joint processors which means that K * is diagonal. The other versions of composite adaptation, e.g., BGF composite adaptation and CF composite adaptation (see, e.g., [43]) can also be used so that smoother parameter adaptation and better tracking performance can be achieved. Specifically, the CF composite adaptation laws can be given as where λ1, λ2, and λ3 are strictly positive forgetting factors (timevarying or constant), andΛ,Γ d , andΛI denote the upper bounds of Λ, Γ d , and ΛI , respectively. Note that Λ(0) and ΛI (0) are chosen as diagonal positive definite matrices satisfying 0 < Λ(0) ≤Λ and 0 < ΛI (0) ≤ΛI , and Γ d (0) can be chosen as a symmetric positive definite matrix satisfying 0 < Γ d (0) ≤Γ d , and in this way, it can be shown that Λ(t) and ΛI (t) are always diagonal, ∀t ≥ 0. The derivative of the nonnegative function V1 defined by (70) in this case becomeṡ Obviously, the stability of the system and convergence of the joint tracking errors can be guaranteed.

C. Adaptive Control of Flexible-Joint Manipulators
The typical result may be the singular-perturbation-based adaptive control approach [10], [44]. Consider a flexible-joint manipulator governed by [45] M0(q)q + C(q,q)q + Bq + g(q) = Ks(θ − q) where θ ∈ R n is the rotor position, Ks is the constant, diagonal, and positive definite stiffness matrix, Dr ∈ R n×n is the rotor inertia matrix seen from the link side, and Br ∈ R n×n is the damping matrix. In this case, the motor velocity command is defined aṡ withqr being defined asq The adaptation laws forŵ,â d , andŵI are given aṡ The low-level PI control action in this case of flexible-joint robots would typically take the form Substituting (80) into the second equation of (74) with some further manipulations gives and the above equation can further be written as As the fast dynamics becomes settled, i.e., Ks(θ − q) is quasiconstant, we obtain that and thus the slow dynamics becomes where K * s = Ks(Ks + KKI ) −1 . The fast/slow-dynamics-based analysis given above is based on [10], [44], and one can rigorously obtain the stability and convergence of the system by following similar arguments as in [10], [44].
Remark 8: Different from the rigid robot case, the actual value of the scale parameter now satisfies diag[w] = K * s K * . Part of the low-level integral action in (80) −KI (θ − q) is the same as the relative position feedback in [44] and its effect is to increase the joint stiffness, providing the possibility of applying the control to manipulators with a relatively low joint stiffness [44].
Remark 9: It is interesting to note that the joint velocity and position commands in the flexible joint case remains the same as the rigid joint case. This provides a good understanding and more importantly an effective justification of why most results derived in the case of rigid robots are generally applicable to (not justified in the previous literature though) practical robotic systems with inner/output loop structure (e.g., most industrial/commercial robotic systems), even without the need of any modification (in practice, any robot has certain joint flexibility). In fact, the relative damping suggested in [10] is naturally included as applying the scaled-dynamic-compensation versions of most control schemes valid for rigid robots to (flexiblejoint) robots in practice. More remarks in terms of the roles of the rotor inertias and joint stiffness are presented in the later simulation.
One may also be interested in deriving a composite adaptive version of the adaptive scheme for flexible-joint manipulators and it shall be feasible by using similar techniques as those for rigid manipulators.

D. Further Discussions
Here, we take several standard adaptive robot control schemes for illustrating how the scaled dynamic compensation makes them to be qualified adaptive outer loop schemes and further the possible applications to robotic systems with an inner/outer loop structure. It seems hopeful that most adaptive robot control schemes in the literature can be reshaped to be adaptive outer loop schemes by accommodating such modifications.
The inner/outer controller structure basically performs the inner joint servoing much faster and the outer loop relatively slower, and thus the scaled dynamic compensation is actually exerted at a quite lower updating cycle. In the case of fast operating process, this would result in degrading of the performance and even instability at certain extreme cases. The main objective of the study and results presented here is to provide the possibility of exerting dynamic compensation (feedforward) even in the standard setting of industrial robotic systems, of course, under the limit of the operation speed. Once upon a while, direct-drive robots are believed to be promising in taking over the role of the standard robots using gear reduction in that direct-drive robots are much efficient and less influenced by friction and backlash, etc. But this hope advances not so favorably, especially in applications, and the reasons may perhaps be the following: • The torque output of direct-drive robots is small and large torque output would require large and heavy joint motors, which, however, are significantly constrained by the weight limit of the manipulator; • direct-drive robots, as is typically expected, are torque-based, but torque-based design is relatively risky and not so reliable since all factors are taken into account at the same time and in addition the communication constraint presents a limit of the coupling torque exerting cycle. These unfavorable factors concerning torque-based design and directdrive robots give rise to the welcome of the inner/outer loop structure in most practical robotic applications and this may still be going in the future. A very recent example is Robonaut 2 [46] which uses harmonic gear transmission instead of the direct-drive configuration, and the feedforward is shown to be necessary to improve the control accuracy as well as the system response within the range of the torque limit. In this specific example, the joint torque control loop is open just for admitting the injection of feedforward or dynamic control action, but from a long run and for promoting the large-scale production and decreasing the cost, the inner/outer loop structure with the joint control loop sealed may perhaps be more desirable.

A. Task-Space Adaptive Control
Consider a three-DOF manipulator with a tool, as is shown in Fig.  2. Its physical parameters are given in Table I with the labels 1, 2, 3, and E denoting link 1, 2, 3, and the tool, respectively, and the diagonal rotor inertia matrix (seen from the link side) Dr =  Fig. 3,  Fig. 4, and Fig. 5, which, respectively, give the task-space position errors, the scale parameter estimates, and the estimate of wI . In the case of using the observer-based scheme, the controller parameters β and γ are determined as β = 1.0 and γ = 1.0, which obviously satisfy the condition (30), and the other controller parameters and the initial parameter estimates are chosen to be the same as those of the filter-based scheme. The task-space position error, the scale parameter estimates, and the estimate of wI are shown in Fig. 6, Fig.  7, and Fig. 8, respectively. 2) Tracking problem: Let us now consider the case of using the observer-based tracking controller given by (23), (12), (21), (24), (25), (16), and (17). The desired task-space trajectory is given as      ∆x (1) ∆x (2) ∆x (3) Fig. 9. Task-space position tracking errors (observer-based tracking control).  The joint position tracking errors and parameter estimates are shown in Fig. 12, Fig. 13, and Fig. 14.
We next consider the case of using the composite adaptation in Sec. IV-B with the controller parameters γ0 and λ f being chosen as γ0 = 0.3 and λ f = 1.0 and the other controller parameters the same as those of the direct adaptive controller. The simulation results are shown in Fig. 15, Fig. 16, and Fig. 17, and in comparison with Fig. 12, Fig. 13, and Fig. 14, we see smoother tracking errors and parameter estimates as well as the improved convergence of the tracking errors.

C. Joint-Space Adaptive Control Considering Joint Flexibility
The joint stiffness matrix Ks is set as Ks = 10 6 × diag ∆q (1) ∆q (2) ∆q (     diag[0. 30, 0.20, 0.15]. The controller parameters are chosen to be the same as the rigid manipulator case except that the adaptation gain ΛI is reduced to ΛI = 60.0I3. The simulation results are shown in Fig. 18, and we see that the performance is comparable with the rigid manipulator case. But one may need to be cautious about the choice of the rotor inertias, and if the rotor inertias are too small [compared with the manipulator inertia matrix due to the link motion, i.e., M0(q) in (74)], it is hard to choose a group of controller parameters that can stabilize the system. This is understandable as we recall the standard practice in terms of the design of the motor inertia, i.e., in the case that the motor inertia is strikingly smaller than the load inertia, the whole system would be quite difficult to stabilize and the use of advanced control algorithms does not help much. In particular, we perform a simulation for the case of reduced joint stiffness matrix, i.e., setting Ks to be Ks = 10 4 × diag[6.0, 3.0, 1.0] with the rotor inertias remaining unchanged. In addition, as the joint becomes more flexible, it is hard for the manipulator to track a fast time-varying trajectory, and therefore we slow down the evolution of the desired trajectory as q d = 36[1 − cos(πt/3), sin(πt/3), sin(πt/3)] T deg. The joint tracking errors are shown in Fig. 19. But as we reduce the rotor inertias to, e.g., 50% of the original, it is very difficult to stabilize the system even with the joint stiffness being unchanged (relatively high). To illustrate the reason behind this phenomenon, we calculate the link inertia matrix M0(q) at q = q(0) = 03 and its value is The three eigenvalues of M0(q) are 0.3352, 18.9058, and 23.7143. This means that the maximum load/rotor inertia ratio reaches 23.7143/0.3 ≈ 79 (happening at the second joint) and such a ratio makes it challenging to stabilize the system. One solution to this problem, as suggested by the standard results in the design of the load/motor ratio, is to increase the joint stiffness, and in other words, larger stiffness allows the specification of larger load/rotor inertia ratio. Fig. 20 shows the joint tracking errors as the stiffness is increased to Ks = 10 8 × diag[6.0, 3.0, 1.0] with the desired joint position being still the same as the rigid manipulator case. However, in the simulation, we have to decrease the integration step size so that the stability of the numerical integration can be ensured since the degree of stiffness of the system dynamics is increased. In this particular case (i.e., increased joint stiffness and decreased rotor inertia), the step size is decreased from 0.5 ms to 0.05 ms. ∆q (1) ∆q (2) ∆q (  The desired trajectory is set to be the same as the case of an inner PI velocity controller. The joint position tracking errors are shown in Fig. 21, which is comparable with the case of an inner PI velocity controller (Fig. 12). Interestingly, no unstable phenomenon is observed even with very fast adaptation to KP and KI although  ∆q (1) ∆q (2) ∆q (  it is currently still challenging to rigorously ensure the uniform exponential stability of (59), and the evolution of qc − qr is plotted in Fig. 22. The quantity qc − qr (which is apparently bounded based on the data shown in Fig. 22) characterizes the injected dynamic compensation of the proposed controller.

E. Further Remarks
One key issue in the above simulations is the choice of controller parameters including those of the low-level PI controller. Different from most theoretical results in the literature that design control laws at the torque level, the system here actually has two loops with strikingly different updating frequency, namely, the low-rate outer loop and the high-rate inner joint servoing loop. Due to this structure, to guarantee the robustness and performance of the whole system, high gains are specified in the high-rate joint servoing loop while low gains are specified in the low-rate outer loop. We naturally produce a system that consists of two loops with two time-scales and interestingly, it is the system constraint that gives rise to the two-timescale behavior of the closed-loop system that we cannot modify.
Another issue often involved in practice is the computational efficiency, especially in the case that the number of the DOFs of the manipulator is very large. The typical solution to this problem is the recursive implementation of the adaptive controllers-see, e.g., [33], [47], [48]. The recursive direct adaptive controller as detailed in [33], [47] has the complexity O(n) and the complexity of the recursive composite adaptive controller in [48] is O(n 2 ), where n denotes the number of the DOFs of the manipulator. We may also note that all the complicated computations of the nonlinear and coupling terms take place in the low-rate outer loop with a powerful computer, and thus the complexity up to O(n) or O(n 2 ) is expected to be acceptable.

VI. EXPERIMENTAL RESULTS
To further show the practical performance of the proposed adaptive outer loop controllers, we perform the experimental study using the UR10 of Universal Robots at Nanyang Technological University (see Fig. 23). We fix the position of upper three joints of the UR10 robotic system to be [0, −1.57, 0] T rad, and only the motion of the first three DOFs is considered, and the low-level inner loop controller is considered to take the PID position control action. Either the position or velocity command for the UR10 robot can be designed and it is not allowed to deign the position and velocity commands simultaneously. The sampling period of the outer loop is around (not exactly) 0.2 s.
We here only take into consideration the Cartesian-space tracking control problem with unknown system dynamics and unknown lowlevel PID controller parameters while the kinematics of the system is accurately known. That is, we use the joint reference velocity defined by (39) yet with the estimated Jacobian matrix being replaced by the actual Jacobian matrix and with xo being replaced by x. The desired trajectory in the Cartesian space is specified as The controller parameters are chosen as γ = 0.5, Kc = 0.8, Γ d = 1.0I16, Λ = 0.01I3, ΛP = 0.02I3, and ΛI = 0.02I3. The initial values of the dynamic parameter estimates are set to be zero, i.e., a d (0) = 016. Note that here we expand a d in (5) to include the parameters associated with the Coulomb friction which can be written as [36] fc = Dsgn(q) where sgn(q) = [sgn(q1), sgn(q2), sgn(q3)] T and D is a 3 × 3 diagonal positive definite matrix with its diagonal entries unknown. Correspondingly, the dynamic regressor matrix used in the experiment is the combination of Y d (q,q,qr,qr) and diag[sgn(qr)]. The initial values of w, wP , and wI are chosen asŵ(0) = 03,ŵP (0) = [1.8, 1.8, 1.8] T , andŵI (0) = [1.2, 1.2, 1.2] T , respectively. The position tracking errors as using the proposed controller are shown in Fig. 24. For comparison, the position tracking errors as using qr as the joint position command (i.e., the conventional kinematic controller) are shown in Fig. 25. The tracking accuracy is apparently improved by using the proposed dynamic modularity approach.

VII. CONCLUSION
In this paper, we have proposed a dynamic modularity approach to adaptive control of robotic systems with an inner/outer loop structure, and both the task-space and joint-space control are taken into consideration under this framework. The proposed adaptive outer loop controllers take into full account the system dynamic effects while ∆x (1) ∆x (2) ∆x (  ∆x (1) ∆x (2) ∆x (3) Fig. 25. Position tracking errors (using qr as the joint position command, i.e., the conventional kinematic controller). most existing kinematic controllers rely on the ad hoc assumption of fast enough joint servoing loop or the modification of the lowlevel joint servoing controller to be much more complicated one. From an application perspective, most existing results cannot ensure the stability of the system or convergence of the tracking/regulation error as applied to robotic systems with an inner/outer loop structure (e.g., most commercial/industrial robotic systems) while the proposed adaptive outer loop schemes can guarantee the stability and convergence of the system without the need to modify the low-level joint servoing loop. The goal of the study here is to yield a module robot control system where the adaptive outer loop is user-defined and the inner loop is factory-defined and embedded.
It might be worth discussing the roles of feedback separation in the proposed controllers. Feedback separation is a design objective introduced in the context of Cartesian-space control and visual servoing control of robots with uncertain kinematics (see, e.g., [31], [32]). Feedback separation is initially for generating simple adaptive kinematic controllers for industrial/commertial robots, and on the other hand it can potentially reduce the activity of the dynamic compensation action. For instance, the filter-based regulation algorithm in Sec. III-A actually does not achieve feedback separation and thus the scaled dynamic compensation action given in (11) involves an additional term −αĴ T (q)∆x (i.e., a stronger compensation action is required). In contrast, both the observer-based regulation and tracking controllers achieve the feedback separation, benefiting from which, the scaled dynamic compensation action defined in (23) no longer involves additional terms (of course, the controller structure becomes more complex since an observer is introduced). From a control viewpoint, this leads us to reconsider the issue of the cancellation of indefinite terms in the standard backstepping-based control. The cancellation of indefinite terms can lead to a good form of the derivative of the Lyapunov function but often gives rise to potentially decreased robustness and strong coupling between different control loops. The realization of feedback separation may help avoid the unfavorable cancellations of indefinite terms.
Furthermore, the proposed approach may possibly be applicable to other classes of (commercial) mechanical systems (e.g., space robots, mobile robots, or aerial vehicles) that have a hidden torque/force control loop yet admit the design of the velocity (or position) command.