Iterative Learning Control with Desired Gravity Compensation under Saturation for a Robotic Machining Manipulator

This paper proposes the design of a hybrid iterative learning controller for a four-degree-of-freedom (DOF) robotic machining manipulator (RMM). It combines a nonlinear saturated (sat) proportional + integral + derivative (PID) control with desired gravity compensation (dgc) and proportional + derivative(PD-) based iterative learning control (ILC).The sat(PID) control is the primary component thatmaintains the local stability of the entire RMMsystem and the PDILC component provides robustness to parameter variations and uncertainties in the robot dynamics. Global asymptotic stability of the proposed control algorithm is conducted using Lyapunov directmethod and LaSalles invariance principle. Simulation results show the effectiveness and robustness of the proposed hybrid iterative learning controller. It is also shown that the proposed controller achieved better tracking performances compared to conventional sat(PDdgc) feedback controller.


Introduction
Various iterative learning control (ILC) strategies and applications have been extensively studied in the last two decades [1][2][3][4][5][6].Arimoto et al. [7] were the first to apply ILC for robotic manipulator tracking control.ILC is an intelligent control technique used for improving the transient performance of systems that operate repetitively over a fixed time interval [2,5].The main purpose of ILC is to find a control input iteratively, resulting in the plant's ability to track the given reference signal with an output trajectory over a finite time interval.The control is the command input function defined on the unchanged time interval, which is updated by using the difference between the desired position function and the actual one.This difference is the error to be driven to zero as the number of trials increases, starting always from the same initial conditions [3,7,8].
The learning loop arrangement is of the pure feedback type, since the command addition is only a function of the error.This function is referred to as the learning feedback and should not be confused with the conventional feedback [4,6].A learning control layout is expected to be convergent in spite of nonpersistent and small persistent disturbances.In the learning control methods, outputs of the controlled system are recorded data at each trial of the controller with respect to the reference values [8].The data are used to progressively reduce the errors during the subsequent trial of the controller.Most existing ILC algorithms are theoretical and difficult to implement [9].
Li et al. [23] developed a stochastic adaptive reference optimal control (LQR-based) for an under-actuated inverted pendulum robot system using radial basis function neural networks.Rigorous global asymptotic stability of the system was established.Chen et al. [27] applied an adaptive radial basis function neural networks-based consensus control method for a multiple collaborative manipulators time-delay system while holding up an object or loading a workpiece.It was shown that the controlled system is asymptotically stable using Lyapunov stability theory.Shaocheng et al. [33] designed an observer-based adaptive fuzzy output feedback controller for an uncertain continuous-time multi-inputmulti-output (MIMO) two-link robotic manipulator.The plant's unknown nonlinear functions were approximated using fuzzy logic systems and state observer was used to estimate the unavailable plant's states.
Regulation and position tracking with bounded inputs and gravity compensation for robot manipulators have been presented in the literature [17,37,38].In these works, the saturation is applied by introducing nonlinear functions in the control laws.These laws require full system information for better closed-loop performance.Here we use the control laws without introducing any special function and the RMM system is driven into desired position with global and semiglobal asymptotic stability.Proportional control plus velocity feedback is the simplest closed-loop controller that may be used to control robot manipulators.
Most of the industrial robots control applications are PID [11,39,40], PD [12,13,41], and PI [42] based, due to their simplicity and clear physical meaning.Despite these advantages, the design of these controllers is still a challenge [43][44][45] for multi-input/multi-output (MIMO) system.A conventional PID control has no learning capability.Once the controller's parameters are tuned, it cannot adapt if operating condition changes, as it frequently occurs in reconfigurable manufacturing approaches.The hybrid iterative control technique that searches for a desired input torque through a sequence of repetitive operations is proposed to overcome this difficulty.The controllers studied in this paper are based on control of the internal coordinates, that is, joint positions.
An increasing number of robots are employed in mechanical machining applications, especially for not too hard materials such as plastics and aluminium.Examples of processes are grinding, deburring, and polishing, while drilling and milling are less common because of the higher requirements on manipulator stiffness, bandwidth, and accuracy [46].The reasons for using robots in machining applications are lower cost and higher flexibility in comparison with computer numerical control (CNC) machines.Moreover, the RMM has a potential to move, independent of the workpiece, giving it the ability to feed quickly on a large part as it does on a smaller, lighter part of a product being machined.
RMM was presented in [47], with conceptual design and physical and mathematical models being introduced.Note that we chose a serial-link robot, which is a more challenging case than a parallel-link robot structure, in terms of rigidity.The major contributions of the paper are as follows: (1) Design of hybrid proportional + derivative controller with desired gravity compensation and the iterative learning control approach for a 4-degree-of-freedom (DOF) nonlinear, complex, and uncertain RMM under bounded actuators' inputs.(2) Ensuring that the system with the designed controller is globally asymptotically stable in the presence of parameter variations and external disturbances.
(3) Reduction of chattering of the control inputs' actuators so that the quality of the manufactured item will be within the acceptable limits.
The paper is organized as follows.Section 2 presents the system physical and mathematical modelling with the detailed description of some of its main dynamic properties.Designs of sat(PDdgc) and hybrid ILC controllers are presented in Section 3, followed by the stability analysis.Section 4 is devoted to simulation and discussion of results.Section 5 gives the concluding remarks with comments on future works.

System Overview and Modelling
2.1.Physical Modelling.Figure 1 shows the physical model of the RMM.Its main purpose is the residual and new manufacturing of the small differences between variants produced using the same premachined and semifinished part.The workspace of the realized configuration is customized for small parts in the range of 150 mm × 150 mm × 150 mm (6  × 6  × 6  ).This workspace is suitable for small parts in industrial production [47].
The RMM with framework of 1000 mm × 350 mm × 1225 mm has four DOF, where two are revolute  2 (), and  3 (), and the other two are prismatic  1 () and  4 ().Its structure (double column type) is hybrid, combining articulated and Cartesian classes of robots.It can alternatively perform multifunctional machining (e.g., drilling and milling) operations from lower tolerances up to medium tolerances of parts made by nonmetallic and softer metal materials.It can also perform welding tasks.
The RMM consists of two parts: principal and auxiliary.Robotic manipulator (position 3) is the principal part with two ends.One end is attached to the support frame through the complex rolling slider (position 2).The slider moves linearly,  1 (), along the horizontal element of the support frame, using linear actuator positioned crosswise the guide rail component not shown in Figure 1.The arm motor is connected to the complex rolling slider and provides the angular motion  2 () to the manipulator.The other end connects the manipulator through the motor case for revolute motion  3 () (position 4) to link two (position 5).Link two is coupled with the prismatic link 3,  4 (), designated as a complex tool holder consisting of a linear actuator case and machining motor case (position 6) [47].
The traditional serial-link robotic manipulator for machining purposes is used mainly in flexible manufacturing systems.It is a fixed-base manipulator.The novelty of the presented RMM is in the mobility of the manipulator base along the robotic framework to perform machining processes; in doing so the manipulator expands the workspace area.Furthermore, it is designed for use in reconfigurable manufacturing cells, thereby extending the RMS concept from a system level to the machine level [48].

Dynamics of the RMM.
The following simplifying assumptions are made in developing the mathematical model [47]: (A1) The links are rigid bodies.
(A2) The in-built friction and backlash at the revolute joints are neglected [49].
(A3) The actuators are selected according to the acting forces and moments in tool, positioning precision, and dynamic characteristics and functionality of the RMM.
(A4) The forces transmitted through the structure of the robotic manipulator are assumed to create negligible deflections in comparison with the displacements of the links through their respective DOF.
(A6) The interaction between the robotic machining tool and the workpiece (external environment) is ignored; that is, force control will not be considered in the present work.
The RMM as a robotic mechanism is modelled applying an articulated chain of rigid bodies (links) which are serially connected by joints.The motion of the joints of the RMM system results in the relative motion of the links, which can be related by homogeneous transformations.The initial end of the chain is loosely attached to a base, with mobility along horizontal frame.The final end is equipped with an end-effector (spindle) and it is free to move to accomplish specified tasks.
There are two distinct approaches to the dynamic modelling of open-loop kinematic chains [51]: the Lagrange formulation and the Newton-Euler formulation.These equivalent approaches accomplish different goals.The Lagrange formulation leads to a compact system of equations of motion, which is appropriate for modelling and control engineering applications and incorporates considerable redundancy.We follow the Lagrange formulation in this paper [47,51].
The RMM system dynamics without friction is described by using Lagrange formulation in compact form with configuration coordinates as follows: where q, q , q ∈ R 4×1 denote the joint position (generalized coordinates), velocity, and acceleration vectors, respectively; M(q) ∈ R 4×4 is the inertia matrix; V(q, q ) ∈ R 4×1 is the centripetal-Coriolis vector; G(q) ∈ R 4×1 is the gravity vector; and () ∈ R 4×1 is the control vector of generalized exogenous torques/forces supplied by the joint actuators.Detailed derivation and full description of the RMM mathematical model are given in [47].Some important dynamic properties of the RMM, which will be used later in the controller design and stability analysis, are given as follows [3,12,18,47,[51][52][53][54][55][56]: (P1) M(q) is the symmetric (i.e., M  = M  ; the offdiagonal elements are the coupling inertias between joints  and ), positive definite inertia matrix.The kinetic energy can be expressed in the quadratic form: 1/2[ q T M(q) q ], in terms of the generalized velocities q .If M(q) were not positive definite, then there would be a nonzero vector of generalized velocities ( q ̸ = 0) for which the total kinetic energy is zero and this is physically impractical.
The inertia matrix, M(q), also satisfies the following inequalities [16]: where I ∈ R  is the identity matrix and   and   are minimum and maximum eigenvalues of M(q) for all configurations q.
This property of the inertia matrix is induced by the link parameters (relative positions and orientations of the links) and the masses and centers-of-gravity of the links.In turn, this property of M(q) propagates into the centripetal and Coriolis components and impacts the gravitational components of the dynamic robot model in (1).V(q, q ) q in (1) includes centripetal C(q) q 2 and Coriolis B(q)[ q q ] terms.The vectors associated with centripetal and Coriolis forces are correspondingly given by (P2) The centripetal and Coriolis vector V(q, q ) q is quadratic in q and bounded so that, for some bounded constant  0 , (P3) The centripetal and Coriolis matrices can always be selected so that the matrix Ṁ(q) − 2V(q, q ) is skewsymmetric.One of the properties of skew-symmetric matrix states that, for  ×  skew-symmetric matrix, S, and any vector X ∈ R  , The skew-symmetric property provides the fact that the fictitious forces in the robot system do no work.
G(q) contains the gravitational forces derived from the potential energy.
(P4) For some bounded constant  0 , the gravity force/ torque vector satisfies For revolute joints, the only occurrences of the joint variables q  are as sin q  and cos q  .(P5) There exists a positive constant  such that The vector of input torques/forces from all the joints' actuators, (), is given by It is assumed that each joint torque/force satisfies the saturation bound, |  | ≤  max ,  = 1, . . ., ,  max > 0. If   represents the control input relative to the th joint, then where sat(⋅) is the standard saturation function given as follows: for  = 1, 2, . . .,  [39].We also assume that which guarantees that the RMM system can be stabilized to any q  ∈ R  .Table 1 provides the physical parameters of the RMM system obtained from the Solid Works model.System model was used to perform a finite element analysis to derive the stiffness of the RMM.The machining motor generates necessary rotational cutting speed in m/mm and has a mass  3 around 1.3 kg.Parameters of the tool support (estimated with fixed cutting tool) are also given in Table 1.

Controller Design
The designed controller should satisfy the following performance specifications: (i) The maximum overshoot should be less than 2% [57].(ii) The settling time should be less than 2 seconds.(iii) The steady-state error should be less than or equal to 2% of the desired reference signal.
The choice of the performance specifications parameters is motivated by the degree of accuracy placed on the machined item.
The output tracking errors for position and velocity are defined as follows: where q  and q  are the desired joint position and velocity, respectively.
The control problem is to design a saturated control input, (), such that lim  → ∞ (e, ė ) = 0 without violating the actuator constraints, |  | ≤  max . where . .,    ] > 0 ∈  × are positive definite diagonal matrices and represent the proportional and derivative gains respectively, which were tuned by the designer and their values are placed in Table 2.Note that control law (13) has only one standard saturation function s(⋅) and the desired gravity compensation is inside it.Figure 2 shows the blockdiagram of sat(PDdgc) control.

PD Controller Design with Iterative
Learning.The main reason why ILC has been widely applied for robotic manipulators is due to its simplicity and potential effectiveness [1-3, 54, 56, 58].The RMM application involves repetitive motions; thus it is natural to consider the use of data collected in previous cycles to try to improve the performance of the robotic machining manipulator in subsequent cycles.This is the basic idea of learning control here.There are three types of basic ILC algorithms [59], explicitly the P-type, PD-type, and PI-type.An iterative learning algorithm that combines with a saturated PID (sat(PID)) feedback controller is considered here, given a goal of position tracking.Figure 3 shows the configuration of the iterative learning control scheme, where   () is the input control signal during the th trial number of iteration applied to the system and producing the output trajectory   ().  () is the desired trajectory.These signals are stored in the memory until the trial is over, at which time they are processed by the ILC algorithm.The learning controller compares   () and   () and adds an updated term to   () to produce  (+1) (), the refined input signal given to the system for the ( + 1)th trial.The signals/trajectories above are functions of time and are defined on a finite interval  ∈ (0, ) ⋅   () is a function that is adaptively tuned.A typical learning algorithm is given by where  +1 is the next output signal;   is the current output signal; e  is the current position error input, e  =   −  ; ė  = ẏ  − ẏ  is the derivative of the error signal; and Φ and Γ are positive definite learning parameters.In applying algorithm (14), two standard ILC assumptions are used: (1) The system returns to the same initial conditions at the start of each trial.
(2) Each trial has the same length.
The control law for collocated sat(PID) controller is where K  = diag[  1 ,   2 , . . .,    ] > 0 ∈  × is the positive definite diagonal matrix, which represents the integral gain.Table 2 gives the tuned controller gains.Figure 4 shows the structure of the controller arrangement that is used in the hybrid approach.The PID feedback controller and an ILC controller are placed in parallel arrangement.This allows for sudden changes compensation in the RMM dynamics.In particular, a sat(PID) feedback controller scheme is designed here to stabilize the highly unstable and nonlinear RMM.

Stability Analysis.
Using property (P5), we define K   as with (⋅),  = 1, 2, . . .,  are strictly increasing linear saturation functions for some (  ,   ) such that [17] The proof is based on the assumption that the RMM system is fully actuated.Substituting ( 13) into (1) gives the closed-loop dynamics of the sat(PDdgc)-controlled system as follows: In order to prove the global asymptotic stability of the sat(PDdgc) control, we choose the following Lyapunov function [16,17,39]: (e, ė ) = 1 2 q  M (q) q +  (e) , where the first term stands for the system kinetic energy function of the RMM.The second term of (19) expresses the potential energy stored in the system and it is given as [16,17]  (e) = ∫ with   (  ) defined as Using property (P1) and the bounded property about the generalized saturation function, it can be proved that (e, ė ) is positive definite and radially unbounded [16,17].Differentiating (e, ė ) with respect to time along the system trajectories gives V (e, ė ) = q  M (q) q + 1 2 q  Ṁ (q, q ) q + q  [G (q) where M(q) q was computed from (18) and Ṁ(q) − 2V(q, q ) is skew symmetric (P3), and by the same P3 gives q  [ Ṁ (q) − 2V (q, q )] q = 0.
It is obvious that V(e, ė ) ≤ 0. Thus, according to Barbalat lemma, the RMM under a sat(PDdgc) controller is globally asymptotically stable.The stability analysis is shown for any choice of K  and K  , as long as these gains are positive definite matrices.The function candidate  decreases as long as q ̸ = 0 for all system trajectory.It should be noted that if the gravitational terms G(q) are unknown, they cannot be added to the input because the input cannot be computed.Controlling the system would then require additional properties.

The ILC Learning Rule.
The performance index for the learning rule considered for all  ∈ [0,   ] is where   () is desired force/torque, ∀ ∈ [0,   ].   ff denotes the predicted feedforward control input to be computed at each iteration by learning rule so that it converges to   .Applying the gradient descent rule gives where  +1 ff and   ff are feedforward inputs. represents the learning gain or training factor.According to [60] it should be (0 <  < 2) so that it can guarantee the convergence of   ff () as it is explained in the same source.Since   () is unknown, the equation can not be used directly as a learning rule.Instead, replace the unknown term (  ()−  ff ()) by the available quantity   fb () which gives the following learning rule: where   fb = Φ(  −   ) + Γ( q  − q  ) + Λ( q  − q  ) denotes the conventional PD controller input, with the feedback gains Φ, Γ, and Λ for position, velocity, and acceleration error components.
It assumed that the time  is reset to zero at the starting point of each iteration and also that q  (0) = q  (0) for all  ≥ 1. Usually the training factor  is chosen in practice to be less than unit due to sensitive considerations [60].The learning rule here is considered as a searching algorithm for the unknown desired input force/torque   () in which the error   fb () from PD controller is used to update   ff ().At the final stage of learning, the RMM is operated predominantly by the feedforward learning controller in computing the   values.
For PDILC-based controller we used sat(PID) to stabilize the controller.No nonlinear saturation function was used in it.For this case, the stability properties of the controlled RMM system are from ( 1) and (15).For properly chosen control gains K  , K  , and K  , the sat(PID) provides the RMM system semiglobal asymptotic stability about the desired position q  .In this case, the tuning of sat(PID) control gains is made in the following procedure.
First the PD gains are set up, and in second step sufficiently small integral gains are chosen and increased gradually to achieve the desired performance.For any desired position, the stability of sat(PID) controller is achieved using high proportional gains that counteract gravitational effects and a lower integral gains to compensate for gravitational torque uncertainties.The integral compensation is used to remove steady-state offset, as in classical control.Theoretically, the asymptotic stability of robot PID control has been proved locally around the desired configuration and/or under complex inequalities among the PID gains.Note that the tuning of the PID gains is in fact a difficult task for nonlinear systems [61].

Simulation Results and Discussion
In this section, the proposed control scheme is implemented and tested within the numerical simulation environment of the RMM.Actuator dynamics and position/force disturbance effects have not been considered.The robotic machining manipulator is required to follow a desired sine wave trajectory for all the prismatic and revolute links, respectively.The maximum values of the control inputs used for simulation are given in Table 2. Its behaviour in closed-loop with saturated PID collocated control is determined by the control law (15).Each iteration starts with resetting time  to zero.The reference trajectories are fixed for all trials, so that the dynamics of the RMM is learned for the particular trajectory, as other dynamics are not excited.The tuning begins with conservative gains for the link  1 , K  = 1 and K  = 0.01, holding other controller gains constant, K  = 1, K  = 1, Φ = 1, and Γ = 1.After each trial is performed, a set of data for the control input and the corresponding output are obtained.When the sat(PID) controller is turned on, a feedback/feedforward scheme is implemented.Various gains are used, and the RMS errors are plotted versus time.For simplicity, only a subset of PDILC + sat(PID) gains that resulted in suitable position tracking and reduction of errors   are given in Table 2.Note that for sat(PID) the integral gains were chosen sufficiently small and then were increased to achieve an acceptable response without significant overshoot.Table 2 also gives the tuned gains for sat(PDdgc) feedback controller.For all control schemes, the saturation limits were chosen to be the same.
Figures 5-8 show the transient responses for the position of the joints from  1 to  4 , respectively.Figure 5 shows that the sat(PDdgc)-controlled RMM follows the desired value with highly oscillating closed-loop response.The convergence is only observed after 12 sec even with the use of high proportional gain action (see Table 2).However, the response for the hybrid PDILC is faster and converges smoothly in less than 2.5 sec, after 35 trials.Both controllers present lagging phenomenon in the initial phase of the control.The  1 joint has no gravity compensation due to horizontal movement.Figure 6 shows sat(PDdgc) response close to the desired value despite the fact that small oscillations are observed along the tracking response.For hybrid PDILC, the position tracking response is acceptably close to the desired value after 25 trials.
Figures 7 and 8 depict the tracking responses for joints  3 and  4 , respectively.The hybrid PDILC controller shows good performance and acceptable small steady-state errors.The number of trials for those joints was 20 and 47, respectively.Conversely, the behaviour of the sat(PDdgc) controller changed very little compared to that of the previous joints.Effect of the gravity compensation is clearly evident in the tracking the desired values for joints  2 ,  3 , and  4 .
Figures 9-16 show the root-mean-square (RMS) of the tracking errors for all the joints.The hybrid PDILC controller shows very good performance and smooth convergence, especially for joints  1 and  2 compared with that of sat(PDdgc) of the same joints.On the other hand, the tracking error for the same controller scheme is slightly  It is well known from the literature that a simple PD control can reduce the steady-state error by increasing its proportional gains [37].Note that all tracking errors of the sat(PDdgc) schemes experience larger oscillations before they start converging smoothly in comparison with hybrid PDILC controller.Figures 17-24 show the time responses of the applied bounded control inputs (forces-torques) for each of the considered control scheme.The control signals corresponding to sat(PDdgc) are characterized with high oscillations due to the effect of damping that this controller is demanding.However, such oscillations have little influence on trajectories of position tracking, except for the joint  1 .
For the hybrid PDILC controller the oscillations have shorter period <4.0sec.This explains how good this control scheme can handle the nonlinearities.Observe that the friction effect was considered as unmodelled dynamics due to      assumption (A2).Notice that the applied forces and torques are within the permitted limits (see Table 2).
Furthermore, the realization of hybrid PDILC + sat(PID) with desired gravity compensation has a large amount of design effort that requires determining the best learning parameters.The actuators are direct-drive brushless motors operated in torque mode, so they take action as torque supply and accept an analog voltage as a reference of torque signal.

Conclusion and Future Work
This paper presented the design of two controllers with bounded control inputs: hybrid PDILC + sat(PID) and sat(PDdgc), both with desired gravity compensation for a RMM.The ILC was applied in conjunction with collocated sat(PID) feedback controller for position tracking of the RMM.
The RMS concept and robotic machining were introduced briefly.This is followed by short presentation of dynamics of the RMM, which revealed strong and nontrivial coupling.To reduce the coupling between the joints the design of RMM was accomplished by reducing the masses in decreasing sequence.This approach reduced the loading factor indicating a weak coupling.
The control law of the RMM system is based on PDILC method and sat(PID) as collocated feedback controller developed for MIMO system in the absence of disturbances.The effectiveness of the proposed hybrid arrangement and     sat(PDdgc) is verified through simulation studies by considering the sine wave reference trajectory for mixed prismatic and rotary joints.The results confirmed the effectiveness of the ILC algorithm in hybrid approach to taking care of the RMM dynamics, for independent joint strategy of position tracking, compared to the sat(PDdgc) feedback controller with desired gravity compensation.The effect of gravity compensation is acceptable for the tracking response, especially for joints  2 ,  3 , and  4 .
A rigorous stability analysis via Lyapunov approach was given to show the global asymptotic stability of the proposed control scheme.Coriolis forces are the main obstacles to achieve global stability via collocated sat(PID) compensation.The input constraints were applied to approximate the RMM system to real-life actuators and have also demonstrated useful result particularly for the hybrid PDILC control.
The work thus presented in this paper forms the basis of the design and development of hybrid control with learning algorithm.Future research directions will include extending the proposed approach to designing an intelligent (neural network-based, fuzzy logic-based, and neurofuzzy) faulttolerant hybrid position/force control in order to address the interaction between the robotic machining tool and the external environment and to accommodate system uncertainties and deteriorations due to failed components (sensors and/or actuators).

Figure 17 :
Figure 17: Applied force for joint  1 using the sat(PDdgc) control scheme.

Figure 23 :
Figure 23: Applied force for joint  4 using the sat(PDdgc) control scheme.

Table 1 :
Physical parameters of RMM.