An Adaptive PID Control for Robot Manipulators Under Substantial Payload Variations

Significant payload variations often occur in many practical tasks for robotic applications. But its adequate control is a formidable challenge to control designers, and previous research works have exhibited either limited performance or noticeable difficulties in implementation. In this article, we have proposed an adaptive PID control that is simple, model-free, and robust against payload variations. These advantages, already verified from the adaptive time-delay control (TDC), have been inherited to the proposed PID control through the equivalence relationship between the two controls. As a result, the proposed PID shares the simplicity, robustness, and the model free property, as well as the high levels of stability and performance with the adaptive TDC. In particular, the selection of its gains becomes especially simple and straightforward, while the adaptation becomes efficient under substantial payload variations. These positive attributes have been verified through simulations and experiments on robots under substantial payload variation. In particular, the proposed PID control was applied to the control of a WAM robot holding a baseball bat, with a result better than a standard PID control.


I. INTRODUCTION
The payload is undoubtedly an indispensable part in any pragmatic robotic task, and any practical application of robots often involves payload variations [1]- [3]. For instance, material handling as a whole involves substantial payload variations, whether the material being grippers, tools, parts to transfer, measuring apparatuses, etc. It is almost inconceivable not to consider payload variations in real applications.
But to control designers, the control of a robot under a substantial payload variation is a formidable challenge. Even without any payload, a robot manipulator alone is already difficult to control owing to the strong nonlinearities and unmodeled dynamics [4], [5]. Introducing a substantial payload immediately increases the inertia matrix and the gravity torque, significantly changing robot dynamics behavior, and The associate editor coordinating the review of this manuscript and approving it for publication was Ning Sun . complicating its control [6], [7]. In this article, we are going to cope with this problem by proposing an adaptive PID control robust to such variations. Provided below are its background and context.
Thanks to its simple structure and clear meanings of its three gains [8], [9], the PID control has been a usual solution candidate for various plants. As a result, it has been widely employed in more than 90% of various control applications [10], [11]. Various PID controllers have been developed over six decades. Adequate tracking performance has been demonstrated in linear plants [12], [13], but poor performance in nonlinear plants such as robots [14], [15]. Different PID control approaches have attempted to combine with Fuzzy logic, optimal control, and Neural networks, which show good tracking performance [16]- [18]. Nevertheless, these methods tend to demand an accurate plant model or involve theoretical complexity, undermining the strength of PID controlstructural simplicity and model-independency -and making it difficult to implement them in real systems. On the other VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ hand, the automatic tuning has been commonly required and studied for appropriately adjusted gains to improve control performance [11], [19]- [21]. These approaches are highly desirable but often require an accurate dynamic model or complex estimation algorithms.
To our present problem of payload various PID control solutions have been proposed. The conventional PID controls, still having constant gains, tend to exhibit control performance deterioration, as was pointed out in [22], [23] and an appropriate PID solution to this problem is rare to find. There have been two PID control approaches proposed for robot manipulators that deal with the payload variation problem. The one in [22] is based on model reference adaptive control (PID+MRAC). The PID+MRAC, however, requires the estimation of robot dynamics by adaptation algorithm, thereby increasing complexity, both structurally and computationally, and slowing down the adaptation rate. The other is a fuzzy PID using a fractional-order operator [23]. This control poses its own implementation problems: the fuzzy PID rule is complex and demands expert experience; fractional-order operators disable the standard form of the PID control, hindering its implementation. Incidentally, it is noteworthy that there are some promising studies [24], [25] for the payload variation problem that do not belong to the PID control category.
To summarize, in the presence of substantial payload variation, the PID controls with constant gains have limited performance, whereas the two above render implementation difficult. To our knowledge, there have been few PID controls including the ones with adaptive gains that present practical solutions with superior control performance.
As a different direction to determine PID gains for robot manipulators, the TDC based approaches have been developed [26]- [28]. The first approach uses the equivalence relationship between the conventional TDC and the standard PID control, enabling a systematic gain selection for PID control (Syst. PID control) [26] and providing constant PID gains. The selection procedure is truly simple and straightforward, offering constant PID gains that guarantee high accuracy under no payload variation conditions. In the presence of substantial payload variation, however, the accuracy deteriorates noticeably, revealing the limitation of constant PID gains. As an extension of the constant gains, a PID control with variable gains was derived from the TDC with a nonlinear damping term [27] -this term makes the PID gains variable. The damping term, however, was intended to address the nonlinear friction problem, not the payload variation issue. As a result, this PID is not that effective against the payload variation. As the third approach, the automatic gain tuning method for PID control has been proposed by using an adaptive rule and the TDE technique [28]; however, neither they considered the significant payload variation.
The aforementioned approaches to the design of the PID control have novelties in one way or another but have not offered a practical solution to substantial payload variation problem. Having considered this pressing problem and yet no adequate solution so far, we intend to propose an entirely new PID control that effectively addresses this problem. Therefore, our contribution points we intend to make through the proposed PID control are summarized as the following: • The PID control is to offer an effective solution to cope with significant payload variations while preserving accuracy, robustness, and stability inherited from the characteristics of the TDC with adaptive gain dynamics (TDCA) [29].
• The control is to provide a practical solution against payload variations that is simple, model-free, and payload-robust.
• The proposed control is to be possess the structure of a typical PID control so that it may be readily applicable to existing PID controllers. We are going to propose a PID control that has those attributes and verify with simulations and experiments.
This article is organized as follows. In Section II, the problems are described in the selection of PID gains and the significant variation of payloads. Section III proposes the adaptive PID control by using gain dynamics and the equivalence relationship between the PID control and the adaptive TDC in the discrete-time domain. In Section IV and Section V, the effectiveness of the proposed PID control will be demonstrated through the simulation and experiment, respectively.

II. PROBLEM STATEMENT
The dynamics of an n-degree-of-freedom (n-DOF) robot manipulator is given as follows: where τ ∈ n represents the joint torque; q,q,q ∈ n the joint displacement, velocity, and acceleration, respectively; M(q) ∈ n×n the inertia matrix; C(q,q) ∈ n×n the Coriolis/centripetal torque vector; G(q) ∈ n the gravitational torque vector; F(q,q) ∈ n the friction torque vector; and τ d ∈ n the disturbance torque. The dynamics (1) can include payload variations, the effect of which will be described in Section II.A.

A. SIGNIFICANT PAYLOAD VARIATION
To realistically portray the payload variation problem, the robot dynamics (1) is reduced for each motor as follows: where • m , • l , and • p denote elements of a motor, a link, and a payload, respectively; I inertia coefficient; N ratio the transmission ratio; m the mass; g the gravitational constant; l the link length; and F m the friction term. For simplicity, the friction caused by a link and a payload is ignored.
It is noteworthy in (2) that payload variations are directly reflected to the change of total inertia, and subsequently transmitted through N ratio to τ m . Thus to the motor -control action is performed here -the payload becomes more substantial in two cases: when the actual moment of inertia increases at the end-effector, and/or when N ratio decreases. Noteworthy too is that I p is a nonlinear function of its own joint as well as other joints. This complicated nature of I p helps understand how difficult it is for a PID control with constant gains to handle the substantial payload variation.

B. SELECTION OF PID GAINS
The standard form of the PID control, which is more common in the industry, is mathematically represented as follows: where K ∈ n×n represents the proportional gain; T D ∈ n×n and T I ∈ n×n denote the derivative and integration time, respectively; e ∈ n the error vector defined as e = q d − q; q d the desired joint displacement; and τ DC ∈ n stands for a dc bias [26].
The closed-loop system combining (1) and (3) often exhibits inadequate control performance and/or instability because of nonlinear and uncertain terms in (1). Consequently, although K, T I , and T D have clear physical meaning, these gains often are heuristically tuned as constant values [26]. How to select them is the problem at hand so that the control performance may be assured under significant payload variations.

III. DESIGN OF ADAPTIVE PID CONTROL
As was mentioned, there exists in the discrete domain an equivalence relationship between the PID control and the TDC. We are going to use this relationship to derive the proposed PID control.

A. EQUIVALENCE RELATIONSHIP 1) THE PID CONTROL IN THE DISCRETE DOMAIN
The PID control in the discrete domain can be readily derived as where the • (k) denotes the discrete value at the k-sampling instant and L the sampling period. Considering the causality in the discrete-time domain [26] and [27], we can use • (k−1) instead of • (k) . Then the PID control (4) is transformed into the PID incremental (velocity) algorithm [11], [26], [27] as follows:

2) ADAPTIVE TDC IN THE DISCRETE DOMAIN
An adaptive TDC has been proposed [29] that demonstrated to adequately cope with significant payload variations, which can be expressed in the discrete form as follows: Time Delay Estimation (TDE) whereM ∈ n×n denotes the adaptive diagonal gain matrix; λ ∈ n×n the positive diagonal matrix for the desired error dynamics. The term τ (k−1) −M (k−1)q(k−1) effectively estimates robot dynamics including payload variations [29].

3) EQUIVALENCE OF THE PID AND TDC IN THE DISCRETE DOMAIN
Employing the backward differenceq (k) = (q (k) −q (k−1) )/L andq (k) = (q (k) − 2q (k−1) +q (k−2) )/L 2 for both (5) and (6), we may be able to express both control laws as follows: For the PID control, For the TDC, The comparison between (7) and (8) reveals that these two share precisely the same function structure; only some parameters differ. Thus, matching the two parameter sets makes the two controls equivalent to each other.

B. THE PROPOSED ADAPTIVE PID GAINS 1) EQUIVALENCE CONDITION
Matching the parameters in (7) with those in (8) immediately leads to the selection of the PID gains as the following: With these gains, the PID control is in essence a TDC expressed in the form of a PID control. Note in (9) thatM (k−1) is used for adaptation purpose without loss of generality, which may be construed as an adaptive version of the constant matrixM in the original derivation [30], [31]. The detail will be discussed later. Under significant payload variation, the adaptation of M (k−1) is to be carried out within each sampling time as follows [29]: where Here, • i and • ii represent the i-th element of a vector • and the ii-th diagonal element of a diagonal matrix •, respectively; VOLUME 8, 2020 α ii the positive gain which affects the adaptation speed ofM ii ; J i a square function based on the tracking error; δ a small positive constant; andM − ii is used for both the lower bound and the initial value ofM ii . Notice that the payload variations are compensated by the adaptation ofM ii in (10).
The resulting closed-loop system is illustrated in Fig. 1, where the PID gains are determined by (9), (10), and (11). To elaborate, the introduction of payload variation changes e i , s i , and J i , in accordance with (11), and subsequently drives the adaptation dynamics according to (10). The detailed adaptation mechanism is described in [29].
As the adaptations are going on according to (10), the PID gains are continuously updated by (9). More specifically, while K is being updated, T D and T I , on the other hand, remain constant once the desired error dynamics is defined in terms of λ. That T D and T I remain constant, however, does not mean the adaptation is limited to the proportional gain K only. Both the derivative gain being KT D and the integral gain KT −1 I according to (4), these two become also adaptive through K. (10), we can rewrite (5) as follows:

2) INTERPRETATION OF THE PROPOSED PID CONTROL
where K(s) = K(s) − K − ≥ 0. The proposed control may be categorized into two parts: The first one, in the first row, may be regarded as the nominal PID control, which is the same as a constant PID control; and the second one, in the next row, represents adaptive control to compensate for payload variation. Note that K in (12) adaptively changes in response to the significant payload variation.
The novelties of the proposed PID control are summarized as follows. First, a practical solution against payload variation is provided without any calculation of robot dynamics and payloads, thanks to model-free and payload-robust property inherited from the TDC by the equivalence relationship (9). To authors' knowledge of the literature on PID control, the proposed control is perhaps the simplest one against significant payload variations in PID control. Second, the proposed PID control can be utilized in existing PID controllers since the structure of typical PID control is maintained. Third, the closed-loop stability with the proposed PID control is proved through Lyapunov analysis in Appendix B.

C. PRACTICAL CONSIDERATIONS 1) TUNING PROCEDURE
The tuning procedure for proposed adaptive PID control is introduced for some practical considerations as follows: Step 1. Two of the PID gains -T D and T I -are determined by the desired second-order error dynamics with λ, which is parameterized in terms of damping ratio and natural frequency. The desired error dynamics is represented as Step 2. The sampling period L is determined by the computing power of control hardware. The smaller L is, the better the control performance becomes. Notice that L must be a constant to guarantee the equivalence condition (9).
Step 3.M − ii and δ are arbitrarily selected as relatively small positive values to avoid instability. The upper bound ofM ii is not given because of unknown payload variation in this article.
Step 4. Only one parameter α ii is tuned by trial and error under no payload condition, by increasing from a small positive value until a given system becomes oscillatory.
It is noteworthy that, of the four parameters in (10) and (11), only α ii needs tuning by trial and error, whereasM − ii and δ may have an arbitrarily small values [29], and λ is determined according to the desired dynamics in (6). For this reason, the gain tuning procedure is especially simple and straightforward compared to other methods. For instance, even a PID control with constant gains, the simplest one, if applied to an n-DOF robot, has 3n gains to be tuned simultaneously, demanding an extremely laborious and time consuming tuning process.

2) DETECTION OF PAYLOAD VARIATION
For practical implementation, it will be truly useful to be able to detect both the attachment and detachment of the payloads. To this end, a wrist sensor may be used to detect if and when a new payload variation is introduced. Upon detection, the adaptive gain and control input are reset to their initial values. Incidentally, this initialization is needed for stable adaptations and reported as a reasonable method in [24]. The details will be covered in Section IV.

A. SIMULATION SETUP
In order to focus on the characteristics and capability of adaptation under significant payload variation, we have opted for a one-link arm for simulation study; a more realistic and complicated case will be dealt in the experiments on a three-DOF spatial robot. Fig. 2 (a) sketches a one-link arm with N ratio = 1 under a significant payload, which is modelled as

1) SIMULATION CONDITION
where I = (m l + m p )l 2 , G(q) = (m l + m p )lgcos(q), and F(q) = f Vq +f C sgn(q). f V and f C represent the viscous and Coulomb friction coefficients, respectively. The values of parameters are set as m l = 1.0 kg, l = 1.0 m, g = 9.8 m/s 2 , f V = 10.0 N·m·s, and f C = 10.0 N·m, respectively. The desired trajectory is shown in Fig. 2 (b). The desired error dynamics is determined asë + 20ė + 100e = 0 and the sampling period L is selected as L = 2 ms. Root-mean-square (RMS) values of tracking errors are employed to compare the tracking accuracy. Here we assume that the payload variations are detected by a wrist sensor so that their time instants can be clearly identified. These time instants are used to initializeM (s) and τ ,M (s) =M − and τ = 0, in order to provide sufficient gain-adaptation [29] and to ensure stability of the system which is covered in Appendix A. For the gain adaptation in (10), the parameter values are selected to be α = 18000,M − = 5.0, and δ = 0.0001, respectively. The proposed method is compared with two different PID controls with constant gains: The first one, PID conventional , is a conventional PID control whose gains are tuned by trial and error [11] under a no payload variation condition; the second one, PID retuned , was an improved version by modifying K and T D of the first one, after a round of comparison between the first and the proposed. The gains for PID conventional were determined as K = 70000, T D = 0.1, and T I = 0.2, respectively; whereas those for PID retuned were adjusted to be K = 149600, T D = 0.05, and T I = 0.2, respectively.

3) SCENARIO 2. COMPARISON OF PID + MRAC AND PROPOSED ADAPTIVE PID CONTROL
The proposed PID control is compared with a PID control with MRAC (PID+MRAC) [22]. In PID+MRAC, the reference model is set as 100/(j 2 +20j+100) where j is the Laplace

B. SIMULATION RESULTS
The simulation results are shown in Figs. 3 to 5. The adaptation of K is displayed in Fig. 3 (a) upon the abrupt payload variations. More specifically, when either the introduction of payloads or their removal occurs at 20, 40, and 60 s, respectively (No payload → 5 kg → 1 kg → 3 kg), s is significantly changed in Fig. 3 (c) -see the blue circles. The change in s drives the counteracting adaptation of K in accordance with (9)-(11) as shown in Fig. 3 (a), whose close-up in Fig. 3 (b) clearly reveals it takes about 0.2 s for the adaptation. In Fig. 4 (a), the adaptation of K in the proposed method is affected by payload variations while there is no change at all in PID conventional and PID retuned . The tracking errors and torques are shown in Figs. 4 (b) and (c), respectively, corresponding results with Fig. 4 (a). After the major adaptation by payloads, the proposed PID control provides better tracking accuracy and appropriate control input.
In Fig. 4 (b), the substantial jumps at 20, 40, and 60 s occur owing to the initialization of the proposed control for unknown payload variations. This initialization is necessary VOLUME 8, 2020  for speeding up the adaptation process in a stable manner. No wonder, this initialization was used in another adaptive method for unknown payload variation [24].
The PID+MARC [22] is compared with the proposed PID method. Although the PID+MRAC guarantees the robustness of payload variations, the PID+MRAC shows a slower transient response than the proposed PID control during model adaptation in Fig. 5, which cause highly oscillated response about at 0 s. Further, the periodic errors are observed by the Coulomb friction.
The effectiveness of adaptation is evident: the adaptation process is rapid, and once it is completed the proposed control  demonstrates better performance. Notice that the tracking accuracy of the proposed PID control is maintained even if significant payload variations occur.

V. EXPERIMENT
We have designed an experiment that involves a significant payload variation condition, mentioned in Section II (B). To this end we have selected a WAM, a robot having considerably low transmission ratio, and loaded with it a hand (0.94 kg) and a baseball bat (1.06 kg), an unusually large payload of 2 kg.
Under such a condition how the gain adaptation performs was investigated, and then the control performance of the proposed PID was compared with that of a systematic PID control (syst. PID control) [26].

A. EXPERIMENTAL SETUP
The schematic diagram in Fig. 6 shows the WAM system, which consists of DC servo motors with cable-driven transmissions. The transmission ratios are 42.0:1, 28.25:1, and 18.0:1 at joints 1, 2, and 3, respectively, which are substantially lower than other types of robots. In conjunction, we made its hand grip a 1.06 kg bat. Note that a 2 kg point mass payload increases the inertia of joint 3 by 59.4%, whereas a 1.06 kg bat by 124.4%. The introduction of the bat together with this transmission ratio may well be regarded as a significant payload variation.
All motors are operated by a PUCK, Barrett patented power module which includes a motor encoder, amplifiers, torque controller, and power supply. With the encoder resolution of 4096 pulses/rev, the respective joint resolution is 2.09 × 10 −3 deg, 3.11 × 10 −3 deg, and 4.88 × 10 −3 deg, at each joint.
The WAM is controlled by an external PC which has a controller area network (CAN) bus and PCI CAN card provided by Barrett Tech. Linux 3.2.21 patched Xenomai 2.6.1 is used for the control system to construct a real-time framework on Ubuntu 12.04. The calculated torques by control algorithms are transmitted into PUCKs for the torque control. The sampling period L is selected as L = 0.002 s because the control loop is operated at 500 Hz.

B. EXPERIMENTAL PROTOCOL
The desired trajectory is selected for the experiment as q d = q init + 20 · (1 + sin(0.4πt + 3π/2)) deg where q init = [ 0.0 −115.6 90 ] T . The desired error dynamics is chosen asë + 20ė + 100e = 0 where the damping ratio and angular frequency are determined to be ζ = 1 and ω n = 10 rad/s, respectively. Therefore, λ is determined as λ = diag ( b) Scenario 2. Comparison with a previous study: The proposed PID control (denoted as 'Proposed.') is compared with systematic PID control ('syst. PID control') [26]. The equivalence of (7) and (8)  The integral of the square value (ISV) of control inputs is used to compare energy consumption [29], [32] as

C. EXPERIMENTAL RESULTS
The effectiveness of the proposed adaptive PID control is verified by the results shown in Figs. 7, 8, 9, Tables 2, and 3. In Scenario 1, as soon as the payload is introduced, the tracking errors instantaneously become larger and so does J, a function of errors, as is manifested in Figs. 7 (b), (d), and (f). As a result, the adaptation process according to (9)-(11) substantially elevates the proportional gain K as shown in Figs. 7 (a), (c), and (e). Once the adaptation of K is converged, the tracking accuracy, as Table 2 shows, becomes similar to that of the no-payload condition. This means the PID gains have been adapted so that the resulting closed-loop system feels as if there were no change in the payload. In Scenario 2, the proposed adaptive PID control is compared with the syst. PID control [26] in Figs. 8     similar performance with the proposed method when the constant gain in syst. PID. 2 is adopted from the proposed one under the payload condition.
In addition, the control inputs are shown in Fig. 9. Under the payload condition, the magnitude of control inputs increases substantially, as shown in Figs. 9 (b), (d), and (f). In particular, Figs. 9 (d) and (f) exhibit that the control inputs of syst. PID. 1 contain highly oscillatory elements coming from inappropriate gains, while the inputs of the proposed method and syst. PID. 2 have similar magnitude to that of syst. PID. 1, but do not have such oscillatory elements.
In summary, the proposed PID control provides the adaptive proportional gain K and two constant gain T I and T D so that the tracking accuracy is maintained in spite of payload variations. In contrast, the syst. PID method [26] requires two different gain sets -syst. PID. 1 and 2 -when the significant payload variation occurs. In this manner, the proposed adaptive PID control achieves better tracking accuracy and more appropriate control inputs than the previous method, which is quantitatively demonstrated in Tables 2 and 3.
In this research, a periodic sharp increase of tracking errors occurs owing to Coulomb friction and stiction at velocity reversal. Although the remedies of this phenomenon have been already studied such as a nonlinear damping [27], a fuzzy logic [33], an ideal velocity feedback [34], and sliding modes [35], we concentrate on the robustness against payload variations in the aspect of PID control, in this article. In the future, the remedies will be considered in the proposed PID control.

VI. CONCLUSION
This article proposes an adaptive PID control to provide an effective and practical solution against significant payload variations, which does not require any calculation of robot dynamics and payload variation thanks to the two properties -model-free and payload-robust. The gain dynamics is applied to the proportional gain to guarantee robustness against payload variations -the PID gains increase when a payload becomes heavier, vice versa. As a result, the proposed adaptive PID control provides better tracking accuracy and appropriate control inputs than previous methods under significant payload variations. The advantages of the proposed adaptive PID control is demonstrated through the simulation and the experiment.
The significance in this article is that anyone in need of effective PID control may enjoy a ready solution without any knowledge on the TDC, and that the proposed PID control can be widely applicable to existing PID controllers since the structure of proposed control is typical in PID control. Consequently, the proposed PID control can be widely used in various areas such as rehabilitation, social, and industrial robotics, etc.

APPENDIX A TIME-DELAY CONTROL (TDC)
Introducing the positive diagonal gainM, the robot dynamics (1) is rewritten as follows: where N(q,q,q) = (M(q) −M)q + C(q,q) + G(q) + F(q,q) + τ d . (17) Notice that N includes the nonlinear and uncertain terms, and is significantly changed by a heavy payload. The TDE technique can estimate N [30], [31] as where • (t−L) denotes the time-delayed value of • by an intentional short time-delay L. As the time-delay L decreases, the accuracy ofN becomes better [30], [31]. Therefore, the time delay L is selected as one sampling period in digital implementation.
The TDE error can be denoted as ε (k) = [I−M −1 (q)M]ε (k−1) and the sufficient condition for boundedness of TDE error is satisfied with 0 <M ii < 2ρ ii where ρ ii is the lower bound of the eigenvalues in the inertia matrix [32], [34], [36]. This implies that in proposed PID control, the sufficient condition for (22) can be achieved by a small positive valueM − ii although the exact eigenvalues of the inertia matrix including payload variations are unknown. Therefore, the TDE error ε is bounded.

APPENDIX B STABILITY ANALYSIS
Under significant payload variations, in conjunction with adaptive gainM proposed in [29], the stability of a closed-loop system was proved. Since the proposed adaptive PID control is the same as the adaptive TDC [29], the equivalent approach is employed. Substituting (20) with s in (11), the closed-loop dynamics is rewritten aṡ s + λs =M −1 ε.
A closed-loop system with the proposed PID control is locally asymptotically stable. We consider a Lyapunov candidate V for the closed-loop system (23) as where K ii (s i ) = K (s i ) ii − K − ii ≥ 0. V > 0 when s i and K ii are not zero (positive definite).
Taking the time derivative of V and substituting (9), (10), and (23) into it, we obtaiṅ whereV is negative semi-definite in (s, K)-space.V is uniformly continuous by the Barbalat's lemma becausë s iṡi is bounded. Therefore, lim s i (t)) = 0. In other words, s(t) → 0 as t → ∞ and, s and K in the closed-loop system are bounded. Consequently, the closed-loop system is locally asymptotically stable.