1 Introduction

Industrial manipulators are commonly used in a variety of applications, most of which requiring contact between the manipulator and the environment. Such contact necessitates a robust control of the interaction force, in light of unknown geometry and characteristics of the environment. In order to control the contact force between the industrial manipulator and the environment, the industrial manipulator should be able to sense the contact force. Generally speaking, there are two kind of industrial manipulators; torque controlled and position controlled. The majority of the commercial industrial manipulators are programmed using a position control. In this control mode, the manipulator’s end-effector follows a prescribed path which is programmed before run time. However, in many applications such as chest surgery, the cutting path is undefined and it depends on many parameters such as the surgeon’s hand movement and the shape of the patient’s chest. In these cases, force and position control are required instead of controlling a predefined trajectory only. Moreover, in these applications the predefined trajectory which is dependent on the surgeon’s hand movement is always tangential to the chest while the force is perpendicular. Thus, force and position control should be applied in unison.

In the robotics field, solving real time force control problems is still a growing field. Many of the force control techniques are complex and robot dynamic should be fully modeled and understood to apply these advanced approaches. The environment characteristics also need to be understood to move a robot with a constant contact force. Robots force control has been studied for many years. Many schemes were introduced, but most of them are not applicable for position controlled industrial manipulators. Position controlled manipulators have closed controllers; therefore accessing joint variables is not possible. Due to limitations of position control, many of the advanced force control techniques (Hogan 1985; Raibert and Craig 1981; Khatib 1987; Whitcomb et al. 1996) are not applicable without any modification to the controller. Providing torque for position controlled manipulators is not applicable. Therefore, the outer force feedback loop is used to close the inner motion control loop and obtain the manipulator desired position that maintains the required contact force, which is known as position based force control (Volpe and Khosla 1993). Many control schemes were introduced to find the relation between the interaction force and the displacement. Bosheng et al. (2013) used Recursive Least Squares algorithm and fuzzy logic control to achieve the required position and contact force. Hogan (1985) modeled the environment as mechanical impedance that contains a virtual mass, spring and damper. The force feedback is used then with the impedance controller to adjust the robot end-effector position and contact force. Using this model, the end-effector position depends not only on a predefined input, but also on the dynamic characteristics of the contact force (Kang et al. 2009).

As mentioned before, the majority of the force control methods are difficult to apply to position controlled industrial manipulators due to three core reasons:

  1. 1.

    In position controlled industrial manipulators, it is difficult to access the joint torques. Therefore, torque feedback is not applicable.

  2. 2.

    The output parameter in the majority of the discussed force techniques is torque while the input to the position controlled industrial manipulator is a position.

  3. 3.

    The majority of the discussed force techniques depend on robot dynamic model. Therefore, any inaccurate modeling might result in failure during the control process.

The integrated system, on the other hand, is composed of different components connected using different types of connectors. Hence, the controller should easily work in real-time in order to reduce latency. Based on these limitations, and to accomplish any given task correctly (without delay); a simple approach that lets the manipulator work in real-time is required. Therefore, two types of controllers (the admittance and the fuzzy logic controllers) are presented to control the interaction force.

2 Force control algorithms

2.1 Admittance controller

As found in robot force control literature, admittance and impedance control are usually used interchangeably. However, the aim of the controller in both cases is to regulate the dynamic behavior between robot manipulator motion and the force exerted on the environment (Hogan 1985; Kikuuwe 2014; Ugurlu et al. 2015). By knowing the position, speed and acceleration of all joints; the impedance controller aim is to calculate the corresponding force. The aim of the admittance control, on the other hand, is to find the position corresponding to the given contact force. In other words, the output of the impedance controller is force, while the output is position in the admittance control scheme. As a result, admittance control is more useful and widely used in industrial robots since most industrial robots have a position interface. The desired mechanical admittance for the manipulator end-effector is the relation between the velocity and resulting force. In the frequency domain, it is given by:

$$\frac{F(s)}{{\dot{Z}(s)}} = M_{d} s + \frac{{K_{d} }}{s} + D_{d}$$
(1)

where Md, Kd and Dd represent the virtual mass, stiffness and damping coefficients respectively. Z represents the Cartesian position in the vertical z direction and F is the resultant normal force. Using the contact force reading at each sample time k, the increment displacement in the z direction is calculated in the discrete time domain as following:

$$\Delta Z(k) = \frac{{\Delta F(k) - {M_d}\Delta \ddot Z(k) - {D_d}\Delta \dot Z(k)}}{{{K_d}}}$$
(2)

where:

$$\Delta \dot{Z}(k) = \frac{Z(k) - Z(k - 1)}{{T_{s} }}$$
(3)
$$\Delta \ddot Z(k) = \frac{{\Delta \dot Z(k) - \Delta \dot Z(k - 1)}}{{{T_s}}}$$
(4)
$$\Delta F(k) = F_{d} (k) - F_{a} (k)$$
(5)

Fd and Fa represent the desired and actual force respectively, at time step k. Ts is the system sampling time.

The admittance controller is used to control the force and diminish the error to zero. However, since the working environment is unknown, a feed-forward control is required to compensate the error that comes from the tracking device and the unknown geometry of the environment. As a result, the total incremental input to the robot position controller is ∆Zt and given by Eq. (6) below:

$$\Delta Z_{t} = \Delta Z_{f} + \Delta Z_{a}$$
(6)

∆Zf represents the increment from the feed-forward controller and ∆Zα the increment due to the admittance controller. The block diagram of the admittance controller is shown in Fig. 1. The stiffness gain was found using Hooke’s law. After contact, the robot was commanded a small increment, then a resultant force was calculated. Finally, by trial and error, the tuning of the mass and damping gains was achieved.

Fig. 1
figure 1

Block diagram of the proposed admittance controller

2.2 Fuzzy logic controller

Simplicity in controller design is always desired, especially in the systems that the accuracy and fast response time are required. Fuzzy logic control (FLC) is one of the best solutions to these cases due to its simplicity and easy implementation. FLC was first introduced and implemented in 1974, to design a controller for the complex and nonlinear systems where the relationship between the input and output parameters is difficult to model analytically (Mamdani 1974). FLC is widely used (Lian 2014; Castillo et al. 2012) and it solves real problems. FLC is implemented with the general form shown in Eq. (7).

$$U_{PID} \left( t \right) = k_{p} e\left( t \right) + k_{i} \mathop \smallint \nolimits e\left( t \right) dt + k_{d} \frac{de\left( t \right)}{dt}$$
(7)

where UPID is the output of the fuzzy logic controller and e(t) is the error signal at time t. kp, ki and kd represent proportional, integral and derivative gains respectively. It is difficult however to remove steady state error using proportional derivative (PD) FLC; in addition, it is sensitive to noise. Therefore, proportional integral (PI) FLC is more suitable for our application, and it is also simple to implement in real-time to obtain fast response. The general form for a conventional FLC-PI, follows the following form:

$$U_{PI} \left( t \right) = k_{p} e\left( t \right) + k_{i} \mathop \smallint \nolimits e\left( t \right) dt$$
(8)

By differentiating Eq. (8) and rewriting it in the discrete time domain we obtain:

$$U_{PI} \left( {k + 1} \right) = U_{PI} \left( k \right) + k_{p} de\left( k \right) + k_{i} e\left( k \right)$$
(9)

UPI is the output of the fuzzy logic controller which represents the input increment in the z direction for the position controlled manipulator. The input fuzzy variables are error e(k) and error variation de(k) at a sample interval of k. They are calculated using Eqs. (10) and (11) respectively.

$$e(k) = F_{d} (k) - F_{a} (k)$$
(10)
$$de\left( k \right) = \frac{{e\left( k \right) - e\left( {k - 1} \right)}}{{T_{s} }}$$
(11)

Fd and Fa are the desired and actual forces respectively, at time step k. Finally, the output of the fuzzy logic controller was scaled by a constant control gain km. The block diagram of the controller is shown in Fig. 2 below:

Fig. 2
figure 2

Block diagram of the proposed PI fuzzy logic controller

The Matlab fuzzy logic toolbox was used to implement a Mamdani type fuzzy PI controller. The control variables have seven labels: positive large (PL), positive medium (PM), positive small (PS), Zero, negative large (NL), negative medium (NM), and negative small (NS). All of the control variables have the same range which is defined between −1 and +1. The membership function is shown in Fig. 3. The rule base approach that is shown in Table 1 was adopted in a similar way to (Li and Gatland 1995).

Fig. 3
figure 3

Membership function for input and output variables

Table 1 The rule base representation

3 Experimental setup

3.1 System components

The main architecture of the system is shown in Fig. 4. The system consists of:

Fig. 4
figure 4

Experiment setup

  1. 1.

    Four degree of freedom (DOF) SCARA Epson manipulator equipped with an RC− 180 controller. The controller communicates with the Epson RC+ 5 software installed on the main workstation using a USB port. However, since the manipulator needs to follow an external position signal that is sent from the optical tracking device, there is a need to establish a TCP/IP connection to continuously feed the RC+ 5 software with the position of the tracking system.

  2. 2.

    ATI Multi-Axis Gamma force-torque sensor is used to measure forces and corresponding torques. The sensor communicates with the workstation using RS232 port.

  3. 3.

    A Polaris Vicra optical tracking device is used to measure the 2-D position of a rigid body consisting of four retro reactive passive markers. The Polaris Vicra communicates with the workstation PC using an RS232 port. The Polaris tracking device is mounted in an overhead position to ensure it maintains ideal conditions to keep the rigid body in its line of sight.

  4. 4.

    Main workstation: by communicating with all systems, the workstation is used to control the whole process.

  5. 5.

    A square piece of wood with different inclined angles is used as the working object, i.e. (environment).

MATLAB is installed on the main PC workstation to control the entire process. The main workstation connects with the different systems using a variety of connectors. After getting all of the required parameters from the different systems, the controller output is fed to the manipulator controller.

3.2 Task description

The actual manipulator was programmed to contact with the environment (a square piece of wood with different inclined angles) at the first step. After contacting the environment, MATLAB keeps reading the desired XY position from the position tracking device and then calculates the ∆Z increment based on the force sensor readings, and finally feeds it to the manipulator controller. The manipulator then moves to the desired position while keeping the required contact force with the environment. The manipulator position controller will allows the end-effector to move smoothly from the initial position (Xi, Yi) to the desired position (Xf, Yf) that is received from the tracking system. However, interrupting the motion or the manipulator is not possible while executing movement commands. Since the environment is unknown and the robot needs to be adjusted in the Z direction continuously, there is a need to change the final path in real-time based on the force reading and tracking device. To implement this successfully in real-time, the total distance was divided into sections with a length of ∆l = 10 mm. In both control techniques the X and Y trajectories in real-time should follow the modified programmed path (Lange et al. 2010) due to the unknown environment. The flowchart for the process is shown in Fig. 5.

Fig. 5
figure 5

Process flowchart of the proposed method

The Nyquist sampling theorem states that the sampling frequency has to be at least twice that of the maximum frequency of the input signal (as known as the Nyquist Frequency). In our system, the manipulator is attempting to follow human hand motion, which operates at frequency less than 4.5 Hz (Xiong and Quek 2006). Based on the technical specifications for the Polaris tracking device, a sampling frequency of 20 Hz can be achieved. Thus the Nyquist criterion is met and the tracking system is capable of capturing hand motion.

4 Result and discussion

In the experimental part, the manipulator velocity in X and Y directions was set to 10 mm s−1. The desired force Fd in both control schemes was set to 10 N. The control parameters for both controllers are shown in Table 2.

Table 2 Controller gains

As shown in Figs. 6 and 7, the admittance controller allows the robot to continue sliding along the inclined plane with an average normal contact force of 10 N. Using this control strategy, the error is mitigated to approximately ±0.75 N. The damping coefficient could be further tuned in order to reduce the overshoot, though at the cost of a slower overall system response. The amount of overshoot, however, is tolerable and having fast system response is more advantageous. The final destination (Xf, Yf) that was read from the Polaris Vicra optical tracking device was approximately (35, 0) mm. Referring to Fig. 6, which shows the end-effector position versus time, the final destination was reached while keeping the desired normal force.

Fig. 6
figure 6

End-effector position in the 3D space using admittance control scheme (Xf, Yf) = (35, 0) mm

Fig. 7
figure 7

Measured normal force at the end-effector using admittance control scheme

Referring to Fig. 8, the fuzzy logic-PI controller produces less overshoot relative to the admittance controller, but a higher error (approximately ± 1.5 N). To compare the two controllers with respect to the input position, the final destination (Xf, Yf) that was read from the Polaris Vicra optical tracking device was set to approximately (35, 0) mm. Referring to Figs. 8 and 9, it is clear that the PI fuzzy logic control scheme was able to track the optical tracking device and control the force with an error falls between ±1.5 N. The system was tested again with different final destinations. Two final destinations were read from the Polaris Vicra optical tracking device, (90, 5) mm using the admittance controller and (68, 5) mm using fuzzy logic control scheme. The experimental results for the two controllers are presented in Figs. 10 and  11, respectively. It can be seen that, the robot end-effector is following the trajectory to the final destination in X–Y plane, and also moving in the z direction to maintain the contact force in the desired reference value.

Fig. 8
figure 8

Measured normal force at the end-effector using fuzzy logic control scheme

Fig. 9
figure 9

End-effector position in the 3D space using fuzzy logic control scheme (Xf, Yf) = (35, 0) mm

Fig. 10
figure 10

End-effector position in the 3D space using admittance control scheme (Xf, Yf) = (90, 5) mm

Fig. 11
figure 11

End-effector position in the 3D space using fuzzy logic control scheme (Xf, Yf) = (68, 5) mm

5 Conclusion

In this paper, an optical tracking device and a force torque sensor were integrated into a position controlled industrial manipulator to facilitate operation in unknown inclined planes. Two force control algorithms (admittance and fuzzy-PI controllers) are presented to control the interaction force, and a number of experiments were conducted to evaluate the robustness of the presented controllers. The results show the ability of the presented control schemes to track the operator signal, while keeping the force within desired range.