OPTIMAL INTERFACE CONTROLLER DESIGN FOR HAPTIC SYSTEM

Haptic technology is the future oriented technology having wide applications in various ﬁeld from medical, military and pilot training to video games and smart-phones. In medical, it can prove a major asset for training the surgeon. The key performance issues in a haptic system are stability and transparency. This paper presents the design of haptic interface controller (HIC) for a 1-DOF haptic system designed to be used by surgical practitioners. The designed controller emphasizes on stability and transparency under the presence of uncertainty and delay. The optimal parameter of HIC has been selected using Genetic Algorithm (GA) and modi-ﬁed Particle Swarm Optimization (m-PSO). The performance of the designed controller is evaluated in terms of performance measure and compared with the conventional tuning method


Introduction
Haptic is a science of manual sensing and manipulation of objects and environments in the virtual environment by means of software and hardware and vice-versa. This system has wide applications in the field of training the medical practitioner, pilots, and gaming on simulated haptic system. These simulated system provide the interface and environment similar to the original one for training purpose. The uses of haptic simulated system ensures the minimum loss of the human body, planes and the money. Input to the haptic system is given in terms of force, position or acceleration by the user. It is sensed and converted to an electrical signal using sensors and transducers respectively and this signal interact with the object in virtual environment (VE). The signal generated in VE is feedback to user called haptic feedback. This whole process of the haptic system ensures the realistic feel to the user [Immonen, 2008;Saddik, 2007;Ullrich and Kuhlen, 2012]. In the field of medical science, training of medical practitioners are based on an apprenticeship model for centuries. A practitioner gains hands-on experience from numerous errors under the supervision of professional mentors. Inadequate experience during the operation can create unavoidable discomfort to the patient. In worst scenario, it can cause perpetual injury or death [Coles et al., 2011].This haptics touch facility can be extended further in medical science, to improve the skills of surgeons [Okamura et al., 2011;Ullrich and Kuhlen, 2012]. The haptic interface can provide them a real sense of touch to practice the various kinds of surgeries to gain some expertise [Liu et al., 2003] before they work with the human body as shown in Figure 1. A haptic interface connects the user with a remote or virtual environment such that the user feels the sense of touch, as shown in Figure 1. In this kind of haptic interaction, energy flows are bi-directional i.e. to and from the user. A haptic device dynamically generates energy, instability if generated, can damage the hardware or cause injuries to the operator [Adams and Hannaford, 1998].Thus the stability of the system is an important aspect. Stability and transparency are the two key issues of haptic interface, stressed in the literature. Transparency can be defined as the quality of impedance or admittance matching [Eom et al., 2000]. A haptic interface may be termed as transparent if it is able to emulate different environments easily for the user, i.e. from infinitely stiff obstacles to free-space [Abdossalami and Sirouspour, 2009]. So, transparency for the haptic system here means an object in the virtual environment should get the same amount of input velocity or force as applied by the user and vice versa i.e. there should be minimum error between applied force and feedback force received by the user [Eom et al., 2000;Hirche et al., 2005]. A system is called as stable if there is bounded output for bounded input [Nagrath and Gopal, 2006].And the stability of haptic system may be defined as the oscillations or vibrations in the output response of the system get settled in a definite time period. During the interaction with the virtual environment, a user sometimes comes across the rigid surface or some unachievable objects, which certainly leads to oscillation or vibration in the feedback response and hence device may vibrate violently. The manner in which the user holds the device, very tightly or conversely, the oscillations may occur, also when the device is released. These oscillations which are generated because of different reasons degrade the performance of the system [Puerto et al., 2012]. So, a transparent haptic system must be stable for decent user-computer interaction.
Gill et.al. in [Gil et al., 2004] and Colgate et.al. in [Colgate and Schenkel, 1997] have established the range of HIC parameters which ensure the stability. The selection of the haptic interface controller parameter becomes an important task because transparency and stability are complementary to each other. The improvement in one will degrade the other. Hence finding the optimal solution satisfying both stability and transparency criterion is very important in haptic studies. Several authors have proposed various method for stability analysis. Authors have proposed stability using Lyapunov like function [Churilov, 2019], and Lyapunov function with parametric effect [Andreev, 2019]. Moreover, an adaptive algorithm for restoring mixed noise has been proposed by Thang et al [Thang et al., 2019]. In [Sedova, 2019] author has discussed stability for nonlinear system. Observer-based boundary control for sino-gordan energy system is posed by Dolgopolik et al [Dolgopolik et al., 2019]. [Balandin et al., 2017] have used H inf control technique to stabilize the system. The stability analysis of these systems using different techniques in the literature cannot be best fitted in present system due to complexity.
To obtain the best fit optimal solution under the constraints various optimization techniques such as Ziegler Nichols (Z-N) method, Neural Network (NN) [Grubov et al., 2017;Kumar and Ohri, 2018], Fuzzy Logic Con-troller (FLC) [Kumar and Ohri, 2017], Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) [Patrascu and Ion, 2016] are available in literature. These techniques have their own advantages and disadvantages, which varies from system to system. A Ziegler Nichols (Z-N) method is the classical method that requires manual fine-tuning further for better performance. In uncertain environments, the neural network has the capability to perform but they need the initial training of the system effectively [Kumar and Ohri, 2018]. Fuzzy Logic Controller (FLC) shown the remarkable result in the various uncertain environment over different system configurations [Dehghani and Khodadadi, 2015] but it requires ample knowledge base of the system. GA uses the process of natural selection and provides the optimal solution among all potential solutions for a particular problem [Patrascu and Ion, 2016], but sometimes it gets stuck in local minimum and longer time is taken for convergence. PSO is another search optimization technique, based upon swarm and offer a better solution in terms of convergence time and global search space [Kennedy, 1997].
This paper presents an optimal haptic interface controller (HIC) for one DOF haptic device, which ensures transparency and stability so as a medical practitioner can have realistic rehearsal and enhance their skills. An equivalent block diagram model of a physical system is developed in the form of a mathematical model incorporating the uncertainty and delay factors. Genetic Algorithm (GA) and modified-Particle Swarm Optimization (PSO) have been applied to optimally design the HIC. The performance of this HIC has been compared with HIC tuned by the Z-N method.
This paper has been organized as follows. The formulation of the nominal model incorporating delay and uncertainty from the physical system is described in Section II. The design of haptic interface controller (HIC) using the Ziegler-Nichols method is presented in Section III. Section IV presents the design of HIC using the Genetic Algorithm (GA) followed by Particle Swarm Optimization-based design of HIC in Section V. Result and discussion is given in section VI followed by the conclusion of work in Section VII.

System Description and Modeling
In literature, various authors [Eom et al., 2000;Gil et al., 2007;Hulin et al., 2009], describe the dynamics of 1-DOF haptic system. It is constituted of three major parts: 1) the virtual coupling or interface network; 2) the robot manipulator, and 3) the virtual environment. The robot manipulator is the mechanical device which is operated by the human operator. The virtual environment consists of the objects similar to the real environment connected to the user via interface circuitry and manipulator device. Interface circuitry is a part that connects, converts, and controls the force/velocity between the manipulator and the virtual environment. In this pa-per, a spring-damper model has been considered as virtual coupling network , which defines the forces for the virtual environment. The force/velocity generated in the virtual environment must be returned or restored to the user without loss, to preserve the transparency. This type of modeling of the haptic system is called as spring-damper modeling as shown in Figure 2. In this model, K and B are the stiffness and damping co-Figure 2. Haptic system spring-damper model efficient for virtual interface circuitry respectively. The values of these coefficients should be as high as possible to ensure good transparency because lower values will make the object feels soft. However, in case we choose very high values of K and B, the system becomes unstable [Gil et al., 2009]. Hence, to ensure stability and transparency, and to satisfy the trade-off between them the optimal choice of K and B is an important factor. Further, a mathematical equivalent has to be derived to analyze and control this mechanical model. The model shown in Figure 2 reconstructed as shown in Figure 3 with an electrical control interface and feedback system [Eom et al., 2000;Díaz et al., 2010].
Here b and m are the physical damping and mass coefficient for the interface of the haptic system respectively. The spring damper interface circuitry C(s) is implemented as haptic interface controller [Eom et al., 2000] as given in (2). Zero Order Hold (ZOH) and quantization are the part of conversion and stability [Churilov, 2019].
where K and B are the virtual stiffness and virtual damping respectively. To ensure realistic behavior, higher transparency is desirable. Higher transparency means the error signal e between the applied force F h and feedback force F f as given in (3) must be minimized.
Furthermore, uncertainty and delay are important factors affecting stability and transparency. In order to investigate the effects of parametric uncertainty and delay on the performance of haptic system, in this paper we have also incorporated them into the haptic system model as shown in Figure 3. The uncertainties in the haptic system can be modeled as delta ∆ varying in the range of −1 ≤ ∆ ≤ 1, the unmolded dynamics represented as w(s), and is defined as (4) [Andreev, 2019].
where ψ and Ω are constants; m and b are the coefficient of mass and physical damping respectively for the haptic system. Furthermore, delay is generated in the system due to quantization, computation sample and hold circuits. Delay i.e. e −t d s is expanded in this system using Taylor Series expansion and incorporated into the mathematical model as shown in Figure 3 [Aleksandrov et al., 2019;Gil et al., 2007]. The various parameters of the chosen haptic system have been given in Table 1. Haptic Interface In literature, it is considered a human operator as an active source of energy. Haptic interface has two ports which are connected with the human operator and virtual environment. Both generate energy, actively, which may lead a device to be unstable. To guarantee the stability, a passivity approach given by [Díaz et al., 2010;Weir and Colgate, 2008] is used which restricts the damping and stiffness of interface. Using these results, further, Gill et al in [Gil et al., 2009], proposed the stability conditions given below as (5) and (6), taking the uncertainty into account.
where T is sampling time, and t d is delay. These conditions are helpful for selecting the virtual damping parameters. These conditions define the stability boundary for haptic interface and ensure a stable haptic device. Colgate et al in [Colgate and Schenkel, 1997], have used fix gain controller but it results in poor performance because if we keep stability high then it leads to reduced transparency and vice-versa. So the key issue taken up in this work to optimally design this interface controller named as Haptic Interface Controller (HIC), such that it enhances transparency while keeping the device stable.

Design of Haptic Interface Controller Using
Ziegler-Nichols Method The 1-DOF haptic system model shown in Figure 4 is further developed in Math-Works Simulink for simulation, including the delay and uncertainty. Parameters of PI controller (HIC) are tuned first using the Ziegler-Nichols method and manually fine-tuned to improve the output response [Kumar and Ohri, 2015].

Simulation experiment for Haptic Interface
Controller (HIC) using ZN method For the simulation and comparison experiments following two cases were considered from literature [Kumar and Ohri, 2015]. Case 1: System in ideal condition Case 2: System having delay and uncertainty Force error e(t) position x(t) and feedback force f (t) are shown in Figure 4, 5 and 6 respectively for above two cases. , 5 and 6 demonstrate that the introduction of uncertainty (∆=1) and delay increase the settling time from 0.05 sec. to 0.06 sec and hence reduce transparency. This also introduced undesired oscillation in the initial time period as shown in Figures 5 and 6. Hence it can be concluded that uncertainty and delay degrade the haptic system performance in the literature [Kumar and Ohri, 2015]. It is observed that uncertainty and delay have an enormous impact on system's performance and ZN method is not suitable to compensate them. Further, all the simulation experiments are performed for case 2 only i.e. for non ideal system.

.1 Genetic Algorithm
Genetic algorithm (GA) is the heuristic method used for optimal tuning of HIC parameter for minimization of error signal. In GA, there are three main stages known as reproduction, crossover and mutation. The first stage, fitness value of every individual is evaluated. The individuals with highest fitness value are selected for the second stage. In the crossover operation, a certain part of individuals is selected and swap in a way to get the good part of from old one. Next stage is mutation, and it is random alteration of a value of a string position in the individuals [Patrascu and Ion, 2016]. The major stages of the GA, are performed as per following steps for selecting the optimal parameters: 1. In the first step, initial, random population are generated for fixed size of individuals. 2. Then fitness of each individuals is evaluated. 3. Following then, each evaluated individuals are compared with termination criteria and check whether they satisfied or not. 4. Reproduce new individuals by the use of probabilistic method. 5. Further crossover operation is performed for the reproduced individuals (This is done using probabilistic method for both the crossover site and the mates). 6. For the individuals having low probability, mutation operation is met. 7. Repeat the step 2 to 6 until a defined convergence criterion is obtained.
The convergence criterion in genetic algorithms, is a user-defined condition. For example, there are maximum number of generations or when the string fitness value exceeds a certain threshold then terminate the process.

Selection of performance criterion of PI Con-
troller Various forms of fitness function are available in literature for minimization of error as given in Table 2 [Gaing, 2004;Wang et al., 2006].
Here IAE is Integral of the Absolute Error, ISE is Integral of the square Error, ITSE is Integral of the Timeweighted Square of Error and ITAE is Integral of the Time-weighted Absolute Error.The ITAE performance index has advantages of producing smaller overshoots and oscillations than the IAE index or the ISE. Overall, ITAE is the most sensitive among them. ITSE is also sensitive but it is not best suitable for computation [Jiao et al., 2000]. So ITAE is chosen as fitness function in this paper.
4.3 Simulation experiment using Genetic Algorithm Parameters of haptic interface controller (HIC) are optimally tuned using GA in presence of uncertainty and delay for the phantom 1-DOF haptic device given in Table 1. The block diagram model is shown in Figure 7. To implement GA algorithm, number of generations and boundaries for optimization have been given in Table  3. No. of Generation 150 The improved GA [Ohri et al., 2014] has been applied to one DOF haptic system to find the parameters for the HIC as shown in Figure 7. The parameters of controller obtained by GA tuning are K=4.26 and B=810.30. Using above optimal value of K and B, various responses viz. error, position and force obtained, are shown in Figures  8, 9 and 10 respectively below. The Figure 8 demonstrates that the error response settling time is reduced to 0.037 seconds as compared to 0.050 seconds obtained by the Ziegler-Nicholas method. Thus the above results show the significant improvement in the haptic system's response using GA as compare to the conventional method.

Design of Haptic Interface Controller using Particle Swarm Optimization 5.1 Particle Swarm Optimization (PSO)
The concept of PSO, introduced by J. Kennedy et. al. in [Kennedy and Eberhart, 1995], shows the robustness while solving the nonlinear optimization problem. This algorithm is a population-based search algorithm in which the population is group of mass-less and volume-less particles. These particles tend to converge towards the best optimal solution in a defined search space. Each particle moves with a velocity which dynamically changes according to particle's previous best experience and along with its neighborhood best position in the previously visited search space [Goodwin et al., 2001;del Valle et al., 2008]. Velocity and position of each particle is updated according to the current position and velocity in pbest and gbest. Velocity and position update formulas are given by [Kassarwani et al., 2019;Shi and Eberhart, 1998].
i,j -j th component of the position of particle i at iteration k. w -Inertia weight factor. c1, c2 -Acceleration factors. rand(1) -Random number in between 0 to 1. rand(2) -Random number in between 0 to 1. pbest i,j -Best position of i th particle at iteration k. gbest j -Best position of the swarm until iteration k.

Modification in PSO
The selection of weight 'w' would help in quick search of optimal results in the population. In [Shi and Eberhart, 1998] the idea of variable weight is presented. Further, modification in variable weight factor 'w' was presented by (Kapoor and Ohri, 2015) given in (9). This modification also reduces the local search time and the total time of convergence. (9) where w max and w min are maximum and minimum inertia weights selected as 0.9 and 0.4 respectively, iter represents the current iteration and iter max denotes the maximum iteration. Initially, inertia weight is large but decreases continuously with respect to increase of number of iteration. In addition to this, velocity is modified as proposed in [Fourie and Groenwold, 2002], for defining the range of velocity v max and v min given in (10) and (11) where k min andk max are lower and the upper limits respectively for the parameter to be optimized. The initial value of velocity and position are calculated as given in (12) and (13) respectively.
where v initial and p initial are initial velocity and the position, is random number matrix. Modified PSO having variable weight, initial velocity and position is applied to find the optimal value of parameters of HIC controller with uncertainty and delay as shown in Figure 11. Particle Swarm Optimization iterative approach can be described by the following steps: Step I First, population size, position of particles and velocity, number of iteration and size of search space is to be initialized.
Step II Each particle's best position p is denoted as local best p best . The best value in all local best pbest is termed as global best g best .
Step III Then fitness f p of each particle is evaluated.
Step VI This evaluated fitness is to be compared with its p best value. If this p best > f p then set p best = f p . Now update the x p current position coordinates of particle x p is to be updated to particles best coordinates for best fitness and best xp is the coordinates corresponding to particle p's best fitness so far.
Step V Value of objective function is evaluated for each particle position. The p best is to update with better position which is encountered during the iteration. Further, as defined in step I, best value among p best is termed as g best . If during the iteration, if a better value is encountered then replace the previous g best value to newly encountered value. If g best>fp then set g best = f p , where g best denotes the best fitness value among all particles in swarm. StepVI Next, update the inertia weight, location, and velocity of the particles in according to (10) to (16), respectively (Kapoor and Ohri, 2015;Shi and Eberhart, 1998).
Step VII Step 2 to 6 be repeated until the stopping criterion is met.

Simulation Experiment Using Modified-Particle Swarm Optimization (m-PSO)
The m-PSO has been applied to 1-DOF phantom haptic system to find the optimal parameter of HIC shown in figure 11. The experiment has been performed on Intel i5 processor built-in personal computer with 4GB RAM. Various parameters of PSO are given in Table 4. The strength of the optimizing tool has been observed under various factors affecting the performance of haptic system, such as delay and other parametric uncertainty.
The 1-DOF haptic system model is designed in MAT-LAB based upon fixed input force for 5N . The uncertainty and delay has been incorporated into the system model. The parameters of controller obtained by m-PSO tuning are K = 10.04 and B = 1245.7. Using above optimal value of K and B, various responses viz. error response e(t), Position response x(t) and feedback force F f (t) using above method are shown in Figure 12, 13 and 14 respectively. These results are compared with GA and conventional tuning ZN method available in literature. The Figure 12 shows that the error response settling time is reduced to 0.020 seconds. These results show improvement in the settling time of the system as compared to ZN method and GA.

Result and Discussion
It is observed from Figure 12 to 14, the performance obtained from m-PSO technique is best with smallest settling time to maintain the transparency and reduced initial oscillation (peak over shoot) leads to a more stable system which is the objective of this work. The parameters obtained of HIC and performance specifications obtained with ZN , GA and m-PSO are given in Table 5. For convenience of comparison, the settling time and peak overshoot obtained are shown in bargraph form in figure 15 and 16 respectively. It can be compared from these bargraph that m-PSO tuned HIC attains best performance in terms of lowest settling time and peak overshoot. Hence ensuring transparency and stability for the haptic system. So this stable and transparent haptic system offers realistic feels to user/trainee surgeons as the force feedback error is minimized with lessor oscillations, reduced peak overshoot and setting time. The parameters of HIC obtained from various methods given in Table 5 are validated with theoretical expression given in equation 5 and 6. After analysis, it is found that these obtained parameters from ZN method, GA and m-PSO, satisfy the stability criterion.

Conclusion
In this paper, a stable and transparent interface controller for 1-DOF haptic system has been designed for the medical practitioner. We have incorporated the various factors such as model uncertainty and delay while designing the haptic system model. This system model ensures the more realistic feeling to the user. The performance of this designed model has been analyzed. The incorporation of these factors into the haptic system affects the response and decreased transparency in terms of increase in settling time. An effort has been made to improve the performance under the presence of said factors by the designing a fine-tuned haptic interface controller (HIC). Modern optimizing techniques such as Genetic Algorithm (GA) and modified Particle Swarm Optimization (m-PSO) have been employed for selection of the parameters of haptic interface controller and stability condition has been validated. The m-PSO has shown better performance in terms of increase in transparency by reduction in settling time and increase in stability by huge reduction in oscillations.