Design and Implementation of Composed Position/Force Controllers for Object Manipulation

: In the design of a controller for grasping objects through a robotic manipulator, there are two key problems: to ﬁnd the position of the object to be grasped accurately, and to apply the appropriate force to each ﬁnger to handle the object properly without causing undesirable movement of it during its manipulation. A proportional-integral-derivative (PID) controller is widely used to grasp objects in robotics; however, its main shortcomings are its sensitivity to controller gains, sluggish response, and high starting overshooting. This research presents three coupled (position/force) controllers for object manipulation using an assembled robotic manipulator (i.e., a gripper attached to a robotic arm mounted on a mobile robot). Speciﬁcally, an angular gripper was employed in this study, which was composed of two independent ﬁngers with a piezoelectric force sensor attached to each ﬁngertip. The main contributions of this study are the designs and implementations of three controllers: a classic PID controller, a type-I controller, and a type-II fuzzy controller. These three controllers were used to ﬁnd an object to be grasped properly (position) and apply an equivalent force to each ﬁnger (force).


Introduction
Due to uncertainty on localization, mobile robot manipulation faces two key problems when trying to manipulate objects: firstly, computing the correct position at which the mobile robot needs to be for grasping an object, and secondly, calculating the specific position at which the object to be grasped is.
Specifically, object manipulation through a robotic arm involves three actions: (i) moving the robot and positioning it at a place where its arm's configuration space intercepts the object's position ( Figure 1a); (ii) planning and execution of the arm's trajectories-that is, to move the robotic arm towards a position where the object is inside the gripper's configuration space, i.e., where the gripper (end effector) may grasp the object [1,2] (Figure 1b); and (iii) tuning the gripping action-i.e., closing the gripper in order to take and manipulate the object properly [3][4][5] (Figure 1c). The first two actions are called the pre-grasping stage, and the last action is named the grasping stage.
The gripper and their controller are key components at the grasping stage in order to manipulate objects accurately. Parallel motion grippers and angular motion grippers are the most commonly used in robotics for object manipulation [6]. Parallel grippers usually have only one motor; therefore, their fingers move simultaneously in order to handle objects. Recently, the use of grippers with angular motions has increased. Thanks to their configuration, these grippers extend the gripping range of objects, and different Focusing on controllers, the PID controller has been widely used in control systems [10][11][12][13] due to its simplicity and robustness. In the last few years, there has been increasing interest in using fuzzy logic in different control systems [14][15][16][17][18][19][20]. Moreover, fuzzy logic has been used for implementing several applications. For instance: in a multicriteria decisionmaking process [21], energy consumption for bipedal walking robots [22], and search engine systems [23]. Fuzzy logic uses fuzzy values and rules to cope with uncertainty, just as humans do. These fuzzy values and rules may be implemented based on the user's experience instead of using complex mathematical models.
In the present work, an angular gripper with two independent fingers was used. Prior to the manipulation stage, the actions described in Figure 1 were done. The object's position, initially unknown, was obtained by a perception system and was used to bring the arm close to the object. However, at this stage of the work, no visual surveying has been used. Instead, a tactile feedback control is performed. The object's dimensions were used to estimate the gripper's initial opening. Once the object was between gripper fingers, angular position and (when object do contact) pressure forces were used to control the motion of each finger independently. The pressure forces were obtained by piezoelectric sensors on the fingertips.
The contributions of this work can be summarized as follows: The implementation of three switching force and position controllers (a PID, a fuzzy type-I and a fuzzy type-II) for grasping tasks with a two-fingered gripper (independent fingers). The evaluation and comparison of those controllers, via simulation and a real arm manipulator. A communication protocol to control and switch between controllers over an ROS. Finally, a control process over a two-fingered angular finger gripper that centers the object in order to apply equivalent forces with both fingers. This paper begins by analyzing some relevant related work (Section 2). Next it presents the details of the system (Section 3). The communication of the gripper with an ROS is described in Section 4. The grasping stage and the design of the proposed controllers are described in Section 5. Experiments and results are presented in Section 6. Finally, conclusions are given in Section 7.

Related Work
Controller design for grasping objects in robotics has been an important research topic in the last few years. In this context, proportional-integral (PI) controllers and proportionalintegral-derivative (PID) controllers have been designed and implemented to be used in the grippers of robotic arms. For instance, a two-finger gripper for the manipulation of deformable objects was implemented [24]. This gripper used a PI parallel force controller with prediction models in order to regulate the force exerted by the robot on the object; thus, the risk of damaging the objects during the grip was reduced.
In order to manipulate objects, a force sensor and a flex sensor can be placed in a gripper [25]. This gripper should be controlled only by a motor that opens and closes the gripper. An algorithm and a control strategy are used to apply force to the object without damaging it.
In [26], a griper with two parallel fingers with two phalanges each and a fixed base was used to manipulate objects. The gripper was controlled only by a motor that provided different torques, and a touch sensor was placed on the fixed surface to measure the pressure applied to the object. In order to manipulate objects, a force sensor can be placed on each finger of a parallel gripper controlled by a single motor [27].
Other studies have tested the designs of controllers using either simulated grippers or simulated robotic hands. For instance, the authors of [28] simulated and manufactured a prototype of a robotic hand with five fingers. To control the kinematic and dynamic movements of each finger, a PID controller was used. They generated a path for each finger in the configuration space, achieving fast motion towards the target angle with a small error signal and little overshooting. However, as described by the authors, when they tested it in a real prototype, the overshooting signal was larger than in the simulation, and was mainly produced by disturbances in some inputs. Moreover, when the reference value was set to a long period of time, small oscillations occurred, again only in the real prototype. Furthermore, the authors of [29] made a mathematical analysis of the contact forces for a robotic finger of three degrees of freedom. The authors proposed two simulated PID controllers; one was used to achieve position and the other to regulate strength. Both controllers were tuned using fuzzy logic.
Regarding using fuzzy logic in control design, the effects of membership functions (triangular, trapezoidal, and Gaussian) on a fuzzy control scheme for a three-finger system have been analyzed [30]. Moreover, another study [31] used a fuzzy control scheme in order to manipulate objects. This control scheme was composed of two fuzzy controllers. The first controller was employed to ensure a stable grip and the second to prevent slipping. In [32], a three-finger gripper to manipulate strawberries without damaging them was developed. A fuzzy controller was designed to compute the force to be exerted on the strawberry. The inputs for this controller were the readings of a capacitive sensor placed on each finger of the gripper. Due to a single motor on the mechanical gripper, the three fingers might be operated simultaneously. Likewise, Reference [33] proposed a fuzzy controller with a gripper using only a single servo motor in order to grasp unknown objects. The authors showed the effectiveness of the controller with three different types of object hardness: soft, moderate, and hard.
Similarly to PI and PID controllers, simulations have been used to test fuzzy controllers. For example, in [34] simulated a fuzzy controller with tactile information to manipulate objects with a two-finger gripper. This simulation was effective; nevertheless, the controller needs to be implemented in a gripper for real applicability. Another study [35] implemented a fuzzy controller to reduce the impacts of forces during the object manipulation. Moreover, the authors developed a fuzzy controller of conformity, in which a mass-spring-damper system determines a desired level of conformity. A simulated robotic hand was used to test the performance of the fuzzy conformance controller.
As can be seen, previous works have had at least one of the following shortcomings: most of them used parallel grippers, not requiring specifically centering the object but limiting the dexterity possible while grasping, and most of the works were tested only in simulated environments or had high variations while testing with real grippers. Consequently, in this work is presented an approach to control the position and force of each individual motor over a two-independent finger gripper in order to increase dexterity; in other words, a robot can adjust grasping by only adjusting the forces and positions of its fingers. Three controllers have been implemented and tested, a PID controller, a fuzzy type-I controller, and a fuzzy type-II controller. In the following sections, implementations and tests are described.

System Description: The Robotic Manipulator
The robotic manipulator assembled in this research is shown in Figure 2. As can be noticed, this robotic manipulator is composed mainly of the following components: • A two-independent-finger gripper. The gripper is composed of two Dynamixel AX-12 servo motors manufactured by CrustCrawler Robotics. Regarding the fingers, each finger is 10.16 cm long and is made of aluminum. Furthermore, they can be open up to 22.86 cm. An FFS-MT piezoelectric force sensor was placed at each fingertip ( Figure 2b) The sensing force range for this sensor goes from 0 to 10 N, with an output resolution of 0.1 mV, providing a stable output over the range of force exerted. In addition, the output of this sensor exhibits linear behavior, as described in [36]. • A three-degrees-of-freedom arm. The arm is operated through Dynamixel servo motors. These servo motors each include a micro-controller, which obtains the different states of the servo motor (e.g., speed, position, temperature, and voltage). The maximum lifting capability is 900 g. A data acquisition board (Arduino) and a 12 V battery were placed on the back of the robotic arm ( Figure 2a). The data acquisition board processes the signals from each force sensor and sends them to the computer. • An iRobot Create. The robotic arm and gripper are mounted on an iRobot Create (mobile base). The iRobot allows moving the robotic arm from one place to another; therefore, objects may be repositioned.

Communication with an ROS
In this work, an ROS was used to communicate with all different systems of the robot. Software packages called nodes run independently from each other. In order to exchange information, the nodes send messages, enclosed in the form of topics. Messages are received from publishers and sent to subscribers directly from the master server of the ROS. Therefore, nodes do not directly communicate with each other. Figure 3 shows a reduced scheme of the nodes and their communication messages on the robotic platform. Two nodes are used to communicate with the hardware: (a) the serial_node receives signals from piezoelectric-force sensors on each finger and encapsulates the signal in a message, which is sent to the ROS; and (b) the dynamixel_manager reads from the ROS the commands for each motor and returns messages about the state of these. A node called Force_Position_controller is in charge of reading "sensor signals" topics and writing commands to "motor-speed" topics. It is at this node where all control computation is performed.

Grasping Stage
As has been stated in Section 1, the grasping stage refers to the action of closing the gripper to take and manipulate the object properly. In order to arrive at this stage, some considerations have to be taken into account.
Generally, mobile robotic manipulators dispose of a perception system that provides the object's information (position, shape, color, etc.) to the arm control system. The perception system can be composed of cameras, laser range finders, depth cameras, or a combination of these sensors. Once the perception system recognizes an object, it sends its information to the position and arm controllers to do the pre-grasping stage. In this work, those stages were realized. In other words, an object's size and position were calculated and the arm was driven to reach the object. However, due to uncertainty in: (a) the relative position of the mobile base, (b) associated with onboard sensors, and (c) due to the control and motion of the arm's joints, the position of end-effector can be slightly different than planned. Therefore, the object's position relative to the gripper can be one of those shown in Figure 4. Namely, the object could be placed in the center, shifted to the right, or shifted to the left between the two fingers. To avoid perception obstruction, as commonly happens with mobile robots, it was decided to not use visual surveying, and instead we used gripper sensor grasping control. The robotic arm used in this work has two-independent fingers with angular motion. Each finger was provided with a piezoelectric force sensor, imposing then, the use of one controller for each finger.

Problem Statement
Since the initial position of the object is practically known, the first thing that the gripper must do is to find and center the object. Three cases could be present: (i) the initial position of the object is in the center between the fingers; the (ii) the initial position of the object is near to the left finger; (iii) the initial position of the object is near to the right finger ( Figure 4).
Then, before the gripper fingers can apply force to the object, it must be centered. If not, the differences in torques while exerting force with unbalanced fingers position can: damage the object or the motors, or make the object slide. Since, at the beginning, none of the force sensors are in contact, it was decided to divide the control system into two different objectives. The former, solving angular positions of the fingers about the object (angular position), and the latter, taking into account the force sensors when they are active.
To deal with these two objectives, it was decided to design a PID position controller and a PID force controller, commuting between them the issues regarding position errors. Once we designed and applied those controllers, and considering the global task of firm and safely handling, the performances of these controllers were not very satisfying. Thus, to compare results, but above all, to increase performance, it was decided to design two fuzzy controllers (one Mamdani type and another type-II). Their advantage over PID controllers is that it is possible to have a different output for each fuzzy-controller, and to avoid sensors' noise, which affects system performance.
Control objectives. Considering that the robotic arm has its gripper near to the object's position, and taking into account the structure of the gripper, the objective of the gripper control system is to achieve firm and delicate object manipulation with the measurement of the angular position and force exerted by each finger. Then, (see Figure 4), it was necessary to design two-feedback laws, position control and force control, such that:

Design and Implementation of the Controllers
To manipulate an object, the forces applied by the fingers generally are sufficient to counteract gravitational and inertial components of the load force acting on the fingertips [37]. Due to the architecture of the two-independent-finger gripper used on the robotic manipulator, the controllers should perform two main tasks: (i) to place and keep the object at the desired position (i.e., position control), and (ii) to regulate the force applied to the object (i.e., a force control). To accomplish these tasks, three controllers are proposed: a hybrid PID controller (position-force), a type-I fuzzy controller (Mamdani), and a type-II fuzzy controller.
These controllers might use the following inputs provided by the robotic manipulator: two readings from angular positions (right Pos Rω (t) and left Pos Lω (t)) and two readings, one each from the force sensor of each finger (right F R (t) and left F L (t)).
On the other hand, the controllers produce a speed command as an output, i.e., two speeds, M R (t) and M L (t), which will be applied to the right and left servo motors, respectively.

Position-Force Hybrid PID Controller
As mentioned previously, PID controllers are widely used in the industry for implementing control systems. Due to its operational ease and low cost, the first implemented controller is based on a hybrid PID scheme; i.e., it consists of two PID controllers: a position PID and a force PID operating in a switching mode as shown in Figure 5. It is important to remark that either of the gripper fingers uses this control scheme. The first controller is responsible for placing and keeping the object at desired position. This controller works as follows: it switches on when the object is not centered, and it switches off when the object is centered. On the other hand, the force controller ensures that the fingers will apply enough force to manipulate an object firmly. This controller works when the position controller is switched off; i.e., the position error is zero.

Position Control
A discrete PID algorithm is used to implement the position PID in the ROS. This algorithm replaces the derivative term using a backward difference method and the integral term using a rectangular integration method. The discrete form of position algorithm for PID is given as: where u p (t) is the control input, K p p is the proportional gain, T i p is integral time, T d p is derivative time or rate time, and e(t) stands for the error between the reference and process output. The values of K p p = 0.000001, K i p = K pp T sp T ip = 0.0001, and K d p = K pp T dp T sp = 0.001 were chosen using the Ziegler-Nichol tuning rule. T sp is the sampling period and e p (t) = Re f pos − Pos ω(t) is the position error. In this case, the position reference is the center of the gripper. When the position error is sufficiently small e p (t) ≤ h with h = ±2%Re f pos , a change is sent to the force PID controller.

Force Control
The force PID controller has a similar structure to the position PID controller.
integral, and derivative gains, respectively. u f (t) is the control input, T i f is integral time, T d f is derivative time or rate time, and T s f is the sampling period. e f (t) = Re f f orce − F(t) is the force error. The Re f f orce is computed according to the object's weight and material; thus, damage on the object might be reduced.

Type-I and Type-II Fuzzy Controllers
Fuzzy control provides a formal methodology for representing, manipulating, and implementing human heuristic knowledge about how to control a system. There are type-I fuzzy systems and type-II fuzzy systems.
Generally, in a type-I fuzzy controller, crisp input values are translated to fuzzy input values (fuzzification). These fuzzy input values are computed using rules to produce fuzzy output values (inference process). Finally, these fuzzy output values are mapped to crisp output values (defuzzification). It can be noticed that there are two conversions from crisp values to fuzzy values in a fuzzy controller. To achieve these conversions, it is necessary to define fuzzy sets. A type-I fuzzy set is an extension of a classical set (see Figure 6a). In a classical set, an element can (membership value = 1) or cannot (membership value = 0) be a member of a set (see blue lines in Figure 6a). Conversely, an element can be a member of a type-I fuzzy set at different membership values; i.e., the membership value can range from 0 to 1 (see red lines in Figure 6a). There are four basic membership functions: singleton, triangular, trapezoidal, and Gaussian distribution curve. Frequently, these membership functions can be designed using knowledge from experts; nevertheless, other studies have used genetic algorithms [38,39] when the defining parameters is challenging. Consequently, type-I fuzzy sets might deal with more uncertainties than classical sets due to the definitions of membership functions.
Regarding the inference process, rules are implemented in order to map the fuzzy inputs to fuzzy outputs. These rules are expressed as IF-THEN statements. The "IF" part is composed of antecedents, which connect the fuzzy inputs, whereas the "THEN" part is composed of consequents, which connect the fuzzy outputs. Generally, the antecedents are defined using two basic operators: and; or. During the inference process, it is frequently the case that more than two rules are fired according to their strengths; therefore, an aggregation operation is performed to join the rules that were fired. These fired rules will define the fuzzy outputs. Finally, the fuzzy outputs are translated to crisp output values using a defuzzification method.
According to [40], type-I fuzzy controllers might face uncertainties in: (i) their control inputs due to noise affecting the sensors; (ii) their control outputs because of a change in the characteristics of the actuators; (iii) linguistic uncertainties because experts might have different meanings for the linguistic labels. Therefore, they implemented rules using the same antecedents and by changing the consequents. Interval type-II fuzzy controllers might cope with these uncertainties. Fuzzy inputs and fuzzy outputs of an interval type-II fuzzy controller are implemented using interval type-II fuzzy sets. These sets add a second level of membership functions; therefore, these interval type-II fuzzy sets have upper and lower membership functions (see Figure 6b). Additionally, a footprint of uncertainty can be seen in these sets, which is the area between the upper and lower membership functions.
Interval type-II fuzzy controllers perform fuzzification, inference, and defuzzification processes. Furthermore, the interval type-II fuzzy controllers execute the fuzzification and evaluation of rules, as the type-I fuzzy controllers do. The key differences between interval type-II and type-I fuzzy controllers are: (i) interval type-II fuzzy controllers use interval type-II fuzzy sets in the antecedents and consequents of the rules; and (ii) after evaluating the rules, interval type-II fuzzy controllers perform a reduction from type-II fuzzy sets to type-I fuzzy sets using a type-reducer. Once this reduction is carried out, a defuzzifier is applied to obtain the crisp output. Figure 7 presents the design of the type-I fuzzy controller. As can be seen, the controller works as follows:

Type-I Fuzzy Controller for Position and Force Control
1.
Firstly, crisp values are obtained from each finger of the gripper. Specifically, angular positions (Pos Rω (t), Pos Lω (t)) and the two readings of force sensors (F R (t) F L (t)) of each finger are inputs to the fuzzy controller.

2.
Secondly, these crisp values are translated into input-linguistic values using trapezoidal membership functions. This stage is called fuzzification.

3.
Thirdly, rules are evaluated to compute the output-linguistic values. This process is called fuzzy inference.

4.
Finally, the output-linguistic values are translated into two crisp values-M R (t) and M L (t), which are the speed values for the right and left servo motors using a defuzzification method. Eight fuzzy input sets were designed and implemented using trapezoidal membership functions for transforming the angular positions and force readings into linguistic values. Focusing on force readings, four trapezoidal membership functions were implemented to transform F R (t) and F L (t) into the following four possible linguistic values: Sensor X O f f (SXO), Sensor X So f t Touch (SXTS), Sensor X Touch Hard (SXTH), and Sensor X Squeeze (SXSQ), where X is R for the right sensor and L for the left sensor.
Regarding the angular positions of the motor, four trapezoidal membership functions were implemented in order to transform Pos Rω (t) , Pos Lω (t) into the following linguistic values: Very Open X Motor (VOXM), Open X Motor (OXM), Center X Motor (CXM), and Closed X Motor (CLXM), where X is R for the right motor and L for the left motor.
On the other hand, in terms of fuzzy output sets, sixteen singleton membership functions were used for the two outputs of the fuzzy inference, eight for each finger. Moreover, it can be seen from Figure 8 that the linguistic labels are named R1, R2, R3, R4, R5, R6, R7, and R8 for the right finger and L1, L2, L3, L4, L5, L6, L7, and L8 for the left finger. These linguistic values are ordered from the lowest speed value to the highest possible speed value of the command motor.  Table 1 presents the fifty fuzzy rules that were created using th fuzzy sets. The rules have the following structure: IF F L AND F R AND Pos Lω (t) AND Pos Rω (t), THEN M L (t), M R (t). As can be seen, these rules correspond to the type of Mamdani fuzzifier using minimum implication, i.e., the "AND" operator for connecting the antecedents.
In order to design the set of fuzzy rules, two basic scenarios were considered: the gripper has an object between its fingers, and there is no object between the gripper fingers (see Figure 9). In the first scenario, the gripper might be located at different positions with respect to the center of the object to be grasped. Specifically, there are three basic cases that the gripper might face in terms of the position of the object to be grasped: • Case 1. The object is located on the left side concerning the center of the gripper (Table1: rules 1-3). • Case 2. The object is at the center of the gripper (Table 1: rules 4-9). • Case 3. The object is located on the right side with respect to the center of the gripper (Table 1: rules 6, 10-11).  Additionally, there are other cases in which the object might be located at a position which is between two cases (Table 1: rules 14-50); i.e., the object might be located at a position between the left region (case 1) and the center point (case 2).
It is important to note that during the evaluation of rules, several rules might be fired; therefore, "maximum aggregation" is applied in this case. Finally, to obtain the two speed values, M R (t), M L (t), "center of gravity" was used as the defuzzifaction technique. Figure 10 shows the interval type-II fuzzy input sets for the four inputs < F R (t), F L (t), Pos Rω (t), and Pos Lω (t) >; and interval type-II fuzzy output sets for the two outputs < M R (t) and M L (t) >. Both types of fuzzy sets are for the right finger. It can be seen that upper membership functions were added to both types of fuzzy sets (fuzzy input sets and fuzzy output sets) defined in the type-I fuzzy controller. Figure 10. Type II (upper and lower) membership functions for the inputs F R (t) and Pos Rω (t), and for the output M R (t).

Type-II Fuzzy Controller for Position and Force Control
The fuzzy rules for the type-II fuzzy controller are the same as those implemented for the type-I controller. These rules correspond to the Mamdani fuzzifier and employ minimum implications. However, the type-II fuzzy controller uses 50 fuzzy rules for the upper membership functions and 50 rules for the lower membership functions. Table 2 shows a summary of these rules. As mentioned earlier, a key difference between type-I and type-II controllers is that type-II uses a type-reducer to transform type-II fuzzy sets to type-I fuzzy sets.
The type-II fuzzy controller employs the Karnik-Mendel (KM) algorithm as the typereducer. The KM algorithm [41,42] computes the lower and upper intervals of the type-II fuzzy outputs for the left and right motors. For instance, the command for the left motor Y i (output) is composed of two intervals [y i ,ȳ i ], where y i is the lower left command motor, andȳ i is the upper left command motor. Therefore, the KM algorithm corresponding to the left motor works as follows: 1.
Firstly, the lower left motor (y l ) is computed in the following manner: (a) y i l is sorted in ascending order, where y i l is the lower left motor. (b) y l is computed as andf i , f i are the firing intervals. Let y l = y l . (c) Find S, such that y S l ≤ y l ≤ y S+1 l . (d) If y l = y l ., go to step 6. If y l = y l , set y l = y l , and stop. (f) Let y l = y l , and go to step 3.

2.
Secondly, the upper left motor (y u ) is calculated using the previous steps; but y u , y u , y u , y i u , y U u , y U+1 u , f i u and U instances are used instead of y l , y l , y l , y i l , y L l , y L+1 l , f i l and L instances.

3.
Finally, the defuzzification process is performed; i.e., the average of y l and y u is computed to be used as the crisp value for the left motor (Y f inal ): These steps are repeated using the lower and upper intervals for the right motor to compute the crisp value for the right motor.

Results and Discussion
The robotic manipulator performs a set of actions in order to grasp an object firmly. The configuration of sensors placed at the fingertips, i.e., a sensor surrounded by a foamy surface, permits the grasping of different objects with diverse shapes. For instance, Figure 11 shows the process of grasping a solid plastic box. The set of actions can be divided into three stages: • Stage 1. The main goal of this stage is to center the object with respect to the center of the gripper. Assuming that the position of the object is known, the gripper starts approaching the object. Once the gripper has touched the object, it proceeds to position the object according to its center (the center of the gripper). This stage is known as "positioning" (Figure 11a-e). • Stage 2. Once the object has been centered according to the gripper, the fingers apply specific forces grasp firmly the object; consequently, the object is less vulnerable to falling. As soon as the object has been grabbed, the base of the robot begins rotating for 4.6 s, which is sufficient time for the base to rotate approximately 180 degrees. At this stage, the force PID, type-I, and type-II have to regulate the force to be applied. This stage is known as "force" (Figure 11f-j). • Stage 3. Finally, once the base of the robot has stopped, the arm moves down so that the gripper can release and position the object on the table (Figure 11k,l).  Figure 12 presents the results from grasping a solid plastic box with a width of 6 cm. This action involved the three stages explained earlier. It is important to recall that the hybrid PID is composed of a position PID and a force PID; consequently, these two PIDs were switched on and off according to the action being performed. These changes are indicated at the bottom of Figure 12. Data were continuously collected for 18 s at a sampling rate of 100 Hz.
It can be seen that the controllers coped with two key control tasks to grasp an object firmly: positioning and force. Regarding the positioning, the three controllers computed position references for each finger of the gripper at stage 1. It can be noticed from Figure 12 that to locate the object at the middle of the gripper, type-I and type-II fuzzy controllers decreased their initial position reference values for the left finger and increased their initial position reference values for the right finger. The three controllers obtained 1.8 rads as the reference position for the left finger, whereas the three controllers obtained a position reference of 3.4 rads for the right finger. In terms of force, the force regulation reference was 60 mV for both fingers. This reference value avoided damage to the object and excessive forces being exerted by the gripper motors. It can be seen that the type-I controller achieved the reference value for the left finger faster than type-II and PID controllers. Moreover, type-II and PID controllers did not achieve the force reference for the right finger. It is important to remark that from 3.62 s to 6.073 s, the hybrid PID switched from a positioning control task to a force control task, whereas the fuzzy controllers performed both control tasks (positioning and force regulation) simultaneously. Focusing on stage 2, it can be seen that the three controllers achieved the reference values in terms of position for both fingers. However, regarding force, the three controllers achieved values for the left finger close to the reference, but only the type-I fuzzy controller obtained values for the right finger close to the reference. Additionally, the hybrid PID controller generated various oscillations during this stage. This fact might be related to the switching between the PIDs.
Particularly, as is shown in Figure 12, there are some spikes in the PID controller's force graph. These spikes correspond to a commutation between PID controllers from force to position. In other words, while the force controller was handling the object, it moved out of the centered position, making commutation necessary to center the object again. Therefore, force sensors measure the inverse force response in relation to the finger motion; i.e., when a spike in force is downward for the right finger, this spike is upward for the left finger, corresponding to an action to center the object.
Finally, the fuzzy controller achieved the reference values in terms of position for both fingers. Regarding the force, the fuzzy controllers obtained values for the left finger close to the reference. It is important to note that the hybrid PID controller generated oscillations at this stage.
For comparison purposes between the PID, fuzzy type-I and fuzzy type-II controllers, 20 experiments were carried out, obtaining the average values of: rise time t r and settling time t s . Table 3 shows the values of the rise time, the settling time, the setpoint, and the type of response. In the same table, it can be observed that all responses were overdamping and the PID had the higher values of t r and t s , indicating poor performance. Table 3. Performances t s and t r in a hybrid PID controller, and in type-I and type-II fuzzy controllers.

Controller
Position In order to perform a preliminary comparison of these controllers, the integral absolute error (IAE) and integral time of absolute error (ITAE) were computed. It can be seen from Table 4 that the type-I fuzzy controller obtained the lowest IAE and ITAE values, whereas the hybrid PID controller resulted in the highest IAE and ITAE values.

Conclusions
In this paper, a hybrid position-force PID controller, a type-I fuzzy controller, and a type-II fuzzy controller were designed and implemented to grasp an object through a threefold arm with an independent two-finger gripper. From the results, it can be concluded that the hybrid PID controller generated oscillations in stages 2 and 3 of manipulating the object due to switching between the position PID and the force PID. On the other hand, few oscillations were generated over the three stages of object manipulation with the type-II fuzzy controller. Moreover, it was able to calculate values close to the references in terms of position for both fingers; but in terms of force, it was able to calculate the appropriate value only for the left finger. As for the type-I fuzzy controller, it obtained the best performance, because few oscillations were generated in the three stages of object manipulation, and its t r and t s values are practically the same. Despite the type-II fuzzy controller having a lower t r in the position controller, it had a higher t s in the force controller and it had more oscillations. The type-I fuzzy controller was able to calculate values close to the reference values in terms of position and force for both fingers.

Conflicts of Interest:
The authors declare that they have no conflict of interest.