Optimal Fuzzy Impedance Control for a Robot Gripper Using Gradient Descent Iterative Learning Control in Fuzzy Rule Base Design

: This paper proposes a novel control approach for a robot gripper in which the impedance control, fuzzy logic control, and iterative learning control are combined in the same control schema. The impedance control is used to keep the gripping force at the desired value. The fuzzy impedance controller is designed to estimate the best impedance parameters in real time when gripping unknown objects. The iterative learning control process is employed to optimize the sample dataset for designing the rule base to enhance the effectiveness of the fuzzy impedance controller. Besides, the real-time gripping force estimator is designed to keep an unknown object from sliding down when picking it up. The simulation and experiment are implemented to verify the proposed method. The comparison with another control method is also made by repeating the experiments under equivalent conditions. The results show the feasibility and superiority of the proposed method.


Introduction
The robot gripper is a useful and important component of an automated system. It is often used to pick up and place a given object on an assembly line in production. It is also used for complex tasks such as assembly of microelectronic components, surgery, etc., or in areas that have hazardous conditions such as high temperature or toxic chemicals [1]. There are many actuation principles used in grippers with mechanical, pneumatic, hydraulic, electric, or piezoelectric actuators, etc. Along with the development of technology, the grippers have been brought to a new level. The grippers not only grip, pick up, and place objects to a new position but also are equipped with sensing capabilities to adapt to changing environments [2].
In automated production, one of the important requirements of grippers is the ability to safely grasp and hold fragile objects of varying stiffness and shapes. Using flexible grippers is one of the solutions. In [3], embedded sensors are used to ensure the safe and optimal behavior of the gripper. The authors establish soft computing methods including extreme learning machines and support vector regression to achieve the prediction of optimal input displacement of the gripper. The authors of [4] deal with a multiobjective optimization problem using a genetic algorithm, while [5] establishes a direct force control for a three-finger adaptive robot gripper by using a proportional-integralderivative (PID) control to grasp objects without damaging them. Suebsomran [6] proposes a new design to control a robot gripper based on the grasping force method. The force controller is designed by using a PID control algorithm with different control gains and objects tuning by experiment methods. A high-speed multifinger reconfigurable gripper is presented in [7]. The gripper can grasp parts with varying geometrical and physical properties at high speed and accelerations. In [8], the authors use a force-sensitive resistor (FSR) to grasp novel objects adaptively with minimal gripping force. A laser-based optical slip sensor is embedded in its fingers to prevent the object from sliding down. The authors of [9] deal with a microgripper driven by piezoelectric actuators. The authors propose an adaptive online estimation scheme to calculate uncertain parameters in the dynamics model and the Kalman filter to predict the system output. Although there is a lot of research in literature, novel control applications are being studied to enhance gripper performance. This paper proposes an intelligent control approach for a robot gripper with the main objective of controlling the optimal gripping force in real time for unknown objects.
The impedance control is used to keep the gripping force at the desired value. Impedance control is an indirect force control method and very popular in interaction control because of its robustness and feasibility [10][11][12][13][14]. However, in the impedance control method, the interaction force is changed from environment to environment and even within the same environment over time. Therefore, it is hard to determine the desired parameters of the impedance controller. In [15], the authors propose a new simple stable force tracking impedance control scheme. The main idea is to minimize the force error directly by using a simple adaptive gain when tracking an unknown environment. In [16], a novel adaptive impedance control is proposed for the robotic manipulator in assisting the operator to perform the human-robot cooperative task. It can optimize the impedance parameters with little information about the model. The authors of [17] use the equilibrium point control theory and reinforcement learning to determine the impedance parameters for contact tasks. In [18], The gradient-following and betterment schemes are employed to obtain the desired impedance model, subject to unknown environments. In [19][20][21][22], the combination of fuzzy logic and traditional impedance control is proposed to enhance the control performance.
The fuzzy logic [23] can deal with nonlinear and uncertain systems, so it can be used to estimate the optimal impedance parameters in real time. However, its effectiveness depends on the rule base, which is built on the initial sample dataset. This paper proposes a combination of iterative learning control (ILC), fuzzy logic, and impedance control. The ILC based on the gradient descent algorithm [24,25] is used to determine the impedance parameters in unknown environments. However, the ILC process takes time for the impedance parameter to converge to the desired optimal value. Therefore, it is not conducive to perform in real time. Instead, it is performed with various sample objects to synthesize a sample dataset of optimal impedance parameters. This dataset is then used to design the rule base of the fuzzy impedance controller, which will run in real time to estimate the optimal parameters of impedance control under each given condition.
Another important requirement of grippers is to keep an unknown object from sliding down after gripping and picking it up. In [26], the authors develop a microlaser Doppler velocimeter as a sensor to detect whether a grasped object is slipping or not. In [27,28], a biomimetic tactile sensor is used to detect and classify slip events. These methods require complicated installation at the contact between the gripper's finger and the object. In this paper, a six-axis force/torque sensor (FTS) mounted on the gripper will be used to design the gripping force estimator, which will calculate the appropriate gripping force in real time to keep the unknown object from sliding down instead of trying to detect slippage. The FTS is simple to mount and avoids direct contact with the object. It also proves effective when it is possible to quickly and accurately estimate the optimal gripping force when picking objects up.
The main contribution of this paper is the proposal of an optimal fuzzy impedance controller, which can operate in real time to safely grasp and hold fragile and unknown objects of varying stiffness and shapes. The optimal fuzzy impedance controller is the combining schema of the impedance control, fuzzy logic control, and ILC. Many studies mention the combination of impedance control and fuzzy logic but do not specify the process of building the sample data for designing the rule base, which plays a very important role in determining the effectiveness of the fuzzy controller. In this study, the ILC process is employed to optimize the sample dataset for designing the rule base to enhance the effectiveness of the fuzzy impedance controller. Besides, the design of the gripping force estimator based on an FTS is a simple but effective application proposal in keeping an unknown object from sliding down when picking it up. Compared with other methods, such as PID control, the proposed method has advantages in that the control parameters are automatically estimated in real time and the force control has higher accuracy and stability. Its effectiveness has been verified by conducting the simulation, experiment, and comparison.
The following content of the paper is organized as follows: Section 2 describes the control schema and system description. Section 3 presents the impedance iterative learning control. Section 4 describes the fuzzy impedance controller. Section 5 presents the simulations, experiments, and comparisons. Section 6 discusses the results. Section 7 is the conclusion. Figure 1 illustrates the model of the two-finger gripper used to apply the optimal fuzzy impedance controller. The FSR is fitted below the finger pads to provide gripping force value. The gripper is attached to the FTS fixed on the end effector of the Hexa robot. The FTS measures the weight of the object, which is gripped and picked up.  Figure 2 is the architecture of the optimal fuzzy impedance controller, including three blocks: position control, force calculation, and optimal fuzzy impedance control. The position control block, using a common PID controller, is responsible for controlling the position c X of the fingers to the desired position d X . The value d X is determined by the initial reference position r X and the position compensation ΔX . For picking up objects of unknown shape and size, the value r X is set relative to the gripper's fully closed position.

Control Schema and System Description
The force calculation block includes FSR and FTS. The gripping force o F is measured by the FSR. The object weight w F is measured by the FTS. r F is the initial gripping force defined by the user. At the beginning of the gripping process, the desired gripping force d F is assigned by the value of r F . When the gripper starts to pick the object up, based on the value w F , it will calculate an appropriate value d F to prevent the object from sliding down. The calculation d F is presented in The optimal fuzzy impedance control block has three sub-blocks: impedance controller, ILC, and fuzzy controller. The impedance controller calculates the position compensation value ΔX for the position control block based on the force error e F , the initial reference position of fingers r X , and the current position of fingers c X . It is the key control, which ensures the gripping force is always kept at a sufficient force. The ILC is derived from the gradient descent algorithm to find optimal parameters B and K of the impedance control in unknown environments. This is the initial learning process. For each kind of object (with various hardness) and various closing speed, the ILC is performed to find an optimal data of impedance parameters. By changing the object material, closing speed, and repeating the ILC, an optimal dataset of impedance control is built for further creating a rule base for the fuzzy controller. Based on this rule base, the fuzzy controller calculates the best impedance parameters simultaneously when the gripper fingers touch on the object surface. If the fuzzy controller cannot match any rule in the rule base, the ILC is recalled to calculate new appropriate parameters of the impedance control. If these parameters make the control reach the desired state, they will be analyzed to create new rules and added to the rule base.

Impedance Iterative Learning Control
This section may be divided by subheadings. It should provide a concise and precise description of the experimental results, their interpretation as well as the experimental conclusions that can be drawn.

The Impedance Control
This section presents the basic structure of the impedance controller, which keeps the gripping force at the desired value. The model of impedance control can be expressed as: where M , B , and K represent inertia, damping, and stiffness parameters, respectively. r X and c X are the reference and current positions of the fingers of the gripper, respectively. e F is the force error, which is based on the desired force d F and the current gripping force o F .
The dynamic behavior of the model is determined by the damping ratio ζ , which is expressed as: For gripping the object with a sufficient force and without oscillation, the damping ratio ζ must be greater than or equal to one (critical damped or overdamped). In practice, it is adjusted to be greater than one (overdamped state) to both eliminate oscillation and ensure the desired gripping force.

The Iterative Learning Control
The ILC is proposed to optimize the impedance parameters for various objects and closing speeds. The inertia parameter M is fixed at an apparent value selected by the experiment based on the mass of the gripper fingers. Because the damping ratio ζ is fixed, only the damping parameter B is updated during the ILC process. The stiffness parameter K is calculated by Equation (2).
The gradient descent ILC algorithm [24] is applied to derive the learning law. The general form of this algorithm is expressed as: where n is the iteration number. u is the input applied to the ILC process. β is the learning gain. G is the transfer function of the nominal model. e is the output error. The product . G e determines the direction of the update vector.
The convergence of Equation (3) is guaranteed if [24,25]: The gripping process tracks the gripping force, so the output error is determined as: The input u of the ILC process in Equation (3) is the damping parameter B . The transfer function G is calculated based on the gradient scheme to ensure a gradual change of the gripping force by updating B . It is derived as: From Equations (3), (5), and (6), the learning law is formed as: From Equations (4) and (6), the convergence condition of the ILC is determined as: In each iteration of the ILC process, the learning gain β is adjusted to satisfy the condition in Equation (8).
The ILC process is stopped if the following conditions are satisfied: where n is the iteration number. p F is the maximum overshoot of the gripping force. fe F is the final force error. σ * is the desired value.

The Implementation of ILC
The ILC process is described as follow: STEP 1: Start the process Starting with a certain object, the desired closing speed g S , and a desired gripping force d F .  (7). The parameter K is calculated by Equation (2). The new values of  e X , Δ e F , B , and K are added to the temporary storage as a record and loaded to the system for the next sample time. Repeating Step 4 with each sample time until the gripping force is stable or the gripping timer reaches a limit value. STEP 5: End the learning loop Checking the stopping condition in Equation (9). If it is satisfied, move to Step 6, otherwise, start a new loop from Step 3. STEP 6: Finish the process Recording the optimal values of ILC: each record in the temporary storage combines with the values p F and fe F in Step 4 will create a new data record in the dataset. Figure 3 shows the force diagram of griping and picking up the object. o P is the weight of the object that is calculated from the parameters of FTS. n F is the gripping force of fingers. f F is the friction force. μ = .

The Gripping Force Estimator
f n F F , where μ is the friction coefficient between the finger pad and the object surface. To prevent the object sliding down, the gripping force must be satisfied: In the implementation, the gripping force is set as: μ = .
2 as o n k P F (11) where as k is the antisliding coefficient.
The friction force μ is set approximately by experiment based on the materials of the finger pad and object surface. The antisliding coefficient as k is set according to the real model. In this study, as k is set to 1.4 for the best performance.

Fuzzy Impedance Controller
Through the experiment, the ILC works very well. However, the best impedance parameters found by ILC are only fit to a specific environmental condition, including object properties and closing speed. If the environment is changed, the ILC needs to be performed again. Therefore, the fuzzy impedance controller is proposed to calculate the best impedance parameters simultaneously based on the knowledge from training without repeating the ILC process.

The Data Collection for Designing Fuzzy Impedance Controller
The ILC process in Section 3.3 provides the data record of the best impedance parameters for a specific environment. By changing either the object hardness or desired closing speed g S and repeating this process many times, an optimal dataset is built for creating the rule base of the fuzzy impedance controller. It is necessary to note that the important parameters in the data record of the ILC learning process are the gripping force error Δ e F , the closing speed  e X , the optimal damping B , the optimal stiffness K , the maximum overshoot p F , and the final force error fe F .

Fuzzy Logic Design
The main objective of the fuzzy impedance controller is to estimate the impedance parameter B . Based on the learning law of ILC in Equation (7), the fuzzy system is designed consisting of two inputs: the gripping force error Δ e F and the closing speed  e X . The output is the damping B . The parameter K is calculated by Equation (2) after the damping B is estimated. Figure 4 shows  The fuzzy impedance controller employs Mamdani If-Then rules as the following form: The dataset will be preprocessed to filter noise based on the maximum overshoot p F and the final force error fe F . Its final data records will be calculated to create the rule base. Figure 5 shows the two-finger gripper and control software interface used in the study. The control software is written in Delphi programming language. The position control of the gripper was modified to fit for the research purpose. Two FSRs have been added under the finger pads to control the gripping force. Figure 6 is the model of the gripper in SimMechanics (MATLAB) used in the simulation of ILC. The model was created with the same parameters and controls as the real model to ensure the simulation results are closest to reality. This section presents the simulation, experiment, and comparison. After that, Section 6 will discuss the results.

The Data Collection by ILC
The model of the gripper is programmed to repeat the ILC process in Section 3.3 for different closing speeds and desired forces in different objects (environment). The closing speed g S varies from 5 to 10 mm/s, with each step being 1. The desired force d F varies from 1 to 8 N, with each step being 0.5. The initial value of B is set at 10 N.m/s. The total number of experiments is 4200, so the dataset has 4200 records. The dataset is analyzed to evaluate the performance based on the parameters of the maximum overshoot p F and the final force error fe F . Table 1 presents the analysis data from 4200 records of the dataset in the simulation. Figure 7 shows the tracking force of several loops in one case of the ILC process with a closing speed of 5 mm/s and the desired force of 4 N.

The Fuzzy Logic Design
The dataset collected above is processed to create the rule base of the fuzzy impedance controller as presented in Section 4.2. The number of regions of inputs and output is = 9 i , = 9 j , and = 49 k .
The maximum magnitudes of the inputs and output are =

The Evaluation of Fuzzy Impedance Control
For evaluating the performance of the fuzzy impedance controller, a testing data is created including 300 records of different values of closing speed, desired force, and object hardness. The testing data does not coincide with the training dataset. The model runs 300 times with the parameters of the testing data. In each time, when the fingers have just touched the object for the first time, the values of Δ e F ,  e X are calculated. The fuzzy impedance controller calculates the impedance parameters B and K . The program measures and records the parameters of the maximum overshoot p F and the final force error fe F . Table 2 presents the analysis data from 300 tests. Figure   8 is the force monitoring data of some cases in the simulation testing. Section 6 will discuss in detail about this figure.

The Data Collection by ILC
Similar to the simulation, the gripper is programmed to repeat the ILC process in Section 3.3 for different closing speeds, desired forces, and object hardness. However, from a practical perspective, it is hard to find many objects with different hardness, so six objects are used as shown in Figure 9. The closing speed g S varies from 5 to 10 mm/s, with each step being 1. The desired force d F varies from 1 to 8 N, with each step being 0.5. The initial value of B is set at 10 N.m/s. The total number of experiments is 540, so the dataset has 540 records. The dataset is analyzed to evaluate the performance based on the parameters of the maximum overshoot p F and the final force error fe F . Table 3 presents the analysis data from 540 records of the dataset in the simulation. Figure 10 shows the tracking force of several loops in one case of the ILC process with the closing speed of 5 mm/s and the desired force of 4 N (the same case as shown in the simulation). Table 3. The ILC quality parameters in the experiment.

The Fuzzy Logic Design
The dataset collected above is processed to create the rule base of the fuzzy impedance controller as presented in Section 4.2. The number of regions of inputs and output is = 9 i , = 9 j , and = 49 k .
The maximum magnitudes of the inputs and output are =

The Evaluation of Fuzzy Impedance Control
For evaluating the performance of the fuzzy impedance controller in the experiment, the gripper is controlled to grip the objects shown in Figure 9 with different values of closing speed and desired force, which are different from the set value in the data collection by ILC. The total number of experiments is 90. In each time, when the fingers have just touched the object for the first time, the values of Δ e F ,  e X are calculated. The fuzzy impedance controller calculates the impedance parameters B and K . The program measures and records the parameters of the maximum overshoot p F and the final force error fe F . Table 4 presents the analysis data from 90 experiments. Figure 11 is the force monitoring data of some cases in the experimental testing. Section 6 will discuss in details about this figure.  Figure 11. The force monitoring of some cases in experimental testing.

Testing the Gripping Force Estimator
For evaluating the gripping force estimator discussed in Section 3.4, the gripper is controlled to grip a plastic bottle, which weighs 115 g. The initial gripping force is set at 1.5 N. The friction coefficient is set as μ = 0.3 . The antisliding coefficient is set as . Once the plastic bottle has been gripped, the robot will move the end effector to pick the bottle up. The gripping force estimator will calculate the appropriate gripping force to keep the bottle from sliding down. Figure 12 shows the tracking force of this process.

The Comparison
The performance of the proposed approach is compared with another state-of-art robot gripper and force control based on the PID control algorithm and objects tuning by experiment methods [6]. The experiments are repeated with the same parameters as summarized in Table 5. The tracking force data of experiments are shown in Figures 13-15. The force errors of experiments are summarized in Table 6.

The ILC for Data Collection
By using ILC, the impedance parameter B converges to an optimal value. As shown in Figures  7 and 10, it takes approximately four loops of the ILC process in each case of both simulation and experiment. The fluctuation of force in the experiment is greater than in simulation. However, the process of convergence of the impedance parameter is consistent between simulation and experiment. Tables 1 and 3 are statistics of the resulted ILC quality parameters in simulation and experiment, respectively. The maximum overshoot and final error of the gripping force in the simulation are very small due to the ideality of the model. The maximum overshoot and final error of the gripping force in the experiment are 0.4827 N and 0.398 N, respectively. This result is quite good and it is safe to grip fragile objects such as eggs.
The ILC process provides the sample data for the fuzzy controller design. Each record in the data is optimized by ILC, so the fuzzy controller design will achieve higher accuracy.

The Fuzzy Impedance Control
Tables 2 and 4 are statistics of testing the fuzzy impedance controller in simulation and experiment, respectively. It shows that the maximum overshoot and final error of gripping force are within the desired threshold. In the experimental testing, the final error of the gripping force is 0.3862 N. In Figure 8, the tracking forces in three cases of simulation testing reach the desired values with very high stability. In Figure 11, the tracking forces in three cases of experimental testing also reach the desired values with a little fluctuation. The fluctuation is mainly due to noise when reading the force value from the FSR. The results confirm that the fuzzy impedance controller can estimate the optimal value of the impedance parameter in different environments in real time without having to perform the ILC process again.

The Gripping Force Estimator
The gripping force estimator keeps the object from sliding down when picking it up. As shown in Figure 12, the adjustment of gripping force occurs continuously in a short period of about 0.5 seconds. Its application is described as follows: when gripping and picking an unknown object up, an initial gripping force is set small enough not to damage the object. The gripper will grip the object with this initial force. After that, the robot will move the end effector to pick the object up slowly. As soon as the object leaves the background, the estimator will be activated to adjust the gripping force to match the actual weight of the object. Throughout this process, the fuzzy impedance controller keeps the gripping force always at the desired value with high accuracy and stability to avoid damaging the object.

The Comparison
In all comparative experiments, the gripping force always reaches the desired value with high accuracy. The force at the steady-state has only a little fluctuation, mainly due to noise when reading the force value from the FSR. Figures 13-15 show the result of the experiment presented in Section 5.3. Compared to the PID control algorithm and objects tuning by experiment methods [6], the proposed method has better stability. The final force error is also much smaller than the error in the other method as summarized in Table 6. This superiority is due to the gripping force being controlled in real time by the optimal fuzzy impedance controller.

Conclusions
In this study, an intelligent control approach for a robot gripper has been proposed to safely grasp and hold fragile and unknown objects of varying stiffness and shapes. The optimal fuzzy impedance hybrid controller of the gripper is the combining schema of the impedance control, fuzzy logic control, and ILC. The ILC is employed to optimize the sample dataset for designing the rule base to enhance the effectiveness of the fuzzy impedance controller, which is used in real time to estimate the optimal parameters in the impedance control. By using ILC, the impedance parameter converges to the optimal value. The experimental results confirm that the fuzzy impedance controller can estimate the optimal value of the impedance parameter in different environments in real time without having to perform the ILC process again. Besides, the design of the gripping force estimator based on a force/torque sensor is a simple but effective application proposal in keeping an unknown object from sliding down when picking it up. Throughout the experiment, the fuzzy impedance controller keeps the gripping force always at the desired value with high accuracy and stability to avoid damaging the object. Compared with the other methods, such as PID control, the proposed approach has advantages in that the control parameters are automatically estimated in real time and the force control has higher accuracy and stability. The proposed optimal fuzzy impedance controller could be used in common robotic applications such as egg handling, fruit harvesting, or sorting other fragile products.