Optimized LQR-PID Controller Using Squirrel Search Algorithm for Trajectory Tracking of a 6-DoF Parallel Manipulator

In 6 Degree of Freedom (DOF) parallel manipulator, trajectory tracking is one of the main challenges. To obtain the desired trajectory, the DC motor needs to generate optimal torque. So to obtain optimal torque, an optimized Linear Quadratic Regulator-Proportional–Integral–Derivative (LQR-PID) controller is presented in this paper. For optimizing the Q, R and gain parameters of LQR-PID controller, Squirrel Search Algorithm (SSA) is presented. In this algorithm, minimal cost function of LQR-PID controller is considered as objective function. The SSA based LQR-PID controller leads the motor to generate optimal torque that helps to attain the desired trajectory of 6-DOF parallel manipulator. Results of the work depicts that the SSA based LQR-PID controller achieves the best mean velocity, sum square error (SSE), integral square error (ISE) and integral absolute error (IAE).


Introduction
Parallel manipulators comprise of at least one closed loop mechanisms and their fixed base is connected to moving platform through at least two serial kinematic chains. Contrasted with serial manipulators, they show better powerful execution, higher accuracy, speed increase, minimization, payload capacity and furthermore have lower producing cost. Appropriately, these manipulators have been utilized in many fields, for example, flight simulations, in fast machine instrument applications, pick-and-spot activity, delicate cutting, bundling and clinical tasks. Be that as it may, the disadvantages of little work area and singularity confine the usage of these manipulators. Luckily, redundancy idea can adequately adapt to these difficulties since, for a given position, an exceptional solution can be picked among a limitless arrangement of inverse kinematic solutions relating to all substantial manipulator configurations [1][2][3].
Trajectory tracking control is a main point of contention in the field of 6-DOF parallel manipulator. It means to empower the joints or connections of the robot manipulator for tracking the target trajectory with ideal unique quality or to balance out them in the predetermined position. A sensible learning gain matrix can further develop the speed of trajectory tracking. To get the ideal learning gain, many explores have been finished including variable exponential gain technique, fuzzy PID strategy, and the strategy joining neural network controller and compensation controller. Be that as it may, the learning law and the complex control law will bring a huge measure of calculation time and influence the speed of trajectory tracking [4][5][6].
Besides, over the recent decades, many researchers had presented novel algorithms for controlling and tracking of ideal path, but none of them is comparable with PID controller because of its simple performance and intricacy. Zeigler Nichols introduced an empirical scheme for adjusting the PID gains, which is used in spite of some drawbacks and restrictions. The major drawbacks of the PID controller are error in computation, noise degradation, over-simplification and complications due to inefficient tuning. This prompted many researchers to evolve a classical optimal control theory to formulate a Linear Quadratic Regulator (LQR) which reduces the excursion in state trajectories of a system with minimum controller effort. LQR controller is popular in handling control [7] algorithm for stable and precious trajectory tracking issues.
Contributions of the paper are described as follows, a. To enhance the performance of trajectory tracking of 6-DOF parallel manipulator, an optimized LQR-PID controller is presented in this paper.
b. Efficiency of LQR-PID controller is enhanced by optimizing the parameters Q, R and gain parameters. For optimization, SSA algorithm is presented.
c. The performance of the approach is analyzed with the mean velocity, SSE, ISE, IAE and cost function.
Remaining sections of the paper are organized as pursues. Recent related literatures are reviewed in section 2. Section 3 presents the optimized LQR-PID controller for trajectory tracking of 6-DOF parallel manipulator. Results of the proposed scheme are analyzed in section 4. The conclusion of the work is described in section 5.

Related works
As the trajectory tracking leads to support the performance of parallel manipulator, many researchers had focused on that. For example, Haiqiang Zhang et al [8] had proposed an effective trajectory tracking control method by combining position/force hybrid with the integration of inertia feedforward control and back propagation (BP) neural network PID control for parallel mechanism with redundant actuation. The task space and joint space of the dynamic models were formulated using d'Alembert and virtual work formulations. Because of the position/force hybrid control method, the authors achieved good performance of trajectory tracking. Atilla Bayram [9] had proposed a kind of planar parallel manipulator with 3-DOF. The proposed model was structured as a variable geometry truss which is also called as planar Stewart platform. The workspaces with reachable and orientation were attained for the manipulator. The author had solved the inverse kinematic analysis depend on the avoidance of joint and redundancy limit. Then, virtual work technique was used to establish the manipulator's dynamic model. The simulations were executed to pursue the input planar trajectories with the dynamic equations of the computed force control scheme and the variable geometry truss manipulator. In the method, gain parameters of PD controller were optimized using genetic algorithm.
Xi Wang and Baolin Hou [10] had proposed trajectory tracking control of 2-DOF manipulator utilizing an implicit Lyapunov function technique and computed torque control (CTC) method. The manipulator was performed under the constraints of payload uncertainty and random base vibration. In both vertical and pitching direction, base vibration performed on the manipulator. The CTC method was used to linearize the non-linear coupling manipulator framework as well as it was used to decouple the framework. Implicit Lyapunov function control method assured the control forces bounded in norm via the process of control. By presenting this combined scheme, the authors had achieved high accuracy of tracking. Jitendra Kumar, Vineet Kumar and K. P. S. Rana [11] had presented a fractional-order self-tuned fuzzy PID controller for controlling MIMO, non-linear and three link robotic manipulator framework. The authors aimed to reduce the complexity of manipulator system. So, the proposed controller was proposed for model uncertainty, disturbance avoidance, trajectory tracking and noise suppression. The gain parameter of the PID controller is tuned using cuckoo search algorithm. The execution of the proposed controller was compared with that of the integer-order and fractional-order fuzzy PID controllers. Due to the proposed controller, integral of absolute error was minimized.
L. Angel and J. Viola [12] had presented fractional order PID controllers for tracking control of a robotic manipulator kind delta. The fractional order PID controller is quite unique from integer order PID controller. Also, it was combined with the CTC method. The proposed model was included following three phases. Identification phase was executed with the least squares algorithm. The CTC was utilized to linearize the robotic system model. Then, integer order and fractional order PID controllers were designed from the linearized model. Dynamical behaviour was evaluated in terms of evaluation trajectories. Because of the proposed scheme, the authors attained better spatial error, joint error and applied torque.
Pedro Pedrosa Reboucas Filho et al [13] had presented two schemes for dealing singularities and to enhance the control of trajectory tracking. One scheme was performed depend on a local genetic algorithm and the second scheme was performed depend on a global genetic algorithm. Each scheme's performance was evaluated using Polynomial trajectories up to 3rd degree in terms of computation cost, trajectory error and count of singularities. The authors had concluded that the global genetic algorithm achieved better computation cost and trajectory error. Figure 1 illustrates the overall structure of the proposed scheme. At first, the objective function is defined using error function e (t). In this work, cost function is considered as the objective function.

Overview
Depend on the objective function; the SSA algorithm optimizes the Q, R and gain parameters of LQR-PID controller. Using the optimized LQR-PID controller, optimal torque is generated. With the optimal torque, the 6-DOF parallel manipulator outputs the actual trajectory y (t). Then the error function e (t) is attained by calculating the difference between the actual trajectory and reference trajectory. The process is continued until getting the desired trajectory.  Figure 2 shows the structure of 6-DOF parallel manipulator. As shown in the structure, the manipulator has universal joints, base platform, legs and moving platform. At the two end of the manipulator, base and moving platforms are connected. These platforms are connected with the support of universal joints and the legs. Universal joints connect the base platform and the legs and the centre point of it is denoted as Bi. As well as, the centre point of the universal joints which connect the moving platform and legs is denoted as Ai. With the point Bi, a symmetrical hexagon is formed. Besides, symmetrical hexagon centre is denoted as Cb and it is the root point of the reference coordinate frame which is denoted as   Cb . 'z' axes direction is perpendicular to the points of base platform upwards. 'x' axes direction is parallel to the points of base platform to the centre point between B1 and B6. 'y' axes direction is estimated using the right-hand rule. With the point Ai, a symmetrical hexagon is formed.

Description of 6-DoF Parallel Manipulator
Besides, symmetrical hexagon centre is denoted as Ca and it is the root point of the reference coordinate frame which is denoted as  Ca . 'z' axes direction is perpendicular to the points of moving platform upwards. 'x' axes direction is parallel to the points of moving platform to the centre point between A1 and A6. 'y' axes direction is estimated using the right-hand rule. The vectors ai and bi denote the vectors of Ai and Bi in   Ca and   Cb respectively. These vectors are denoted as follows, In the first state, the z axis of   Cb is joined together with the z axis of   Ca . The x and y axes of   Cb are parallel to the x and y axes of   Ca and the point Ca vector in   Cb is 'h' and is denoted as follows,

Inverse kinematics
The overall orientation of the 6-DOF parallel manipulator is represented as follows, Where, position (Q) of the manipulator translation and the posture (Z) of the manipulator orientation are represented as follows, The orientation transformation is described using Roll Pitch-Yaw (RPY) angles. Initially, the coordinate frame   Ca is rotated around the x-axis of  angle which is known as Yaw, and then the occurring coordinate frame is rotated around the y-axis of  which is known as Pitch. At final, the coordinate frame is rotated around the z-axis of  angle which is known as Roll. The transformation matrix between the moving and reference coordinate frame is defined using (7).
Equation (7) also can be represented as follows, Here, c and s denote the cos and sin functions respectively.
Using (5), (6) and (7), length of the leg of manipulator is determined. Figure 3 shows the i th actuator's vector diagram. In the diagram, the dotted line represents the initial state   Ca and solid state represents the arbitrary position state in the overall orientation. The vector of i th leg is attained by calculating the difference between ai and bi in  Cb . The expression of i th actuator is defined as follows, Equation (9) can be written as follows, Where, PA B represents the position.
The i th leg length is calculated using (11) and the length square of i th leg is attained using (12).

LQR-PID controller
To optimize the linear system, LQR design is an efficient method utilized in state-space feedback. Figure 4 shows the conceptual diagram of the LQR-PID of the manipulator. From the figure, state variables of the manipulator are described in the following equation (13).
The input reference point r(t) is set as '0' as the exterior set point is not influence the design of controller.
Equation (14) can be revised as follows if there is no change in the r(t).
The Inverse Laplace transform of equation (15) The formulation of state space model is described as follows, From equation (17), the following matrices are defined.
To solve the problem of LQR, the cost function is to be minimized. The cost function is defined using The state feedback control law minimizes the quadratic cost function. It is defined as follows, Where V denotes the symmetric positive matrix of Continuous Algebraic Riccatti function defined as follows, The gain parameters of PID can be estimated from equation (24) and are defined as follows, To enhance the performance of LQR-PID controller for attaining the optimal control signal, the Q, R and gain parameters (Ki, Kp and Kd) of the controller is optimized using SSA algorithm, the following section describes the optimization of LQR-PID controller using SSA algorithm.

SSA Algorithm Based LQR-PID Controller
Squirrel search algorithm is developed from the strategy of foraging behaviour followed by squirrels.
The food search process isn't simpler even during warm climate (autumn), since the squirrels have to investigate various areas of forest and just glide from one tree to the next for looking through food resources. Anyway they get food from the plentifully available acorns. The squirrels consume acorns directly and begin looking for the optimal food source (hickory nuts) intended for to be stored for winter season. This procedure of squirrels will assist them with satisfying their energy necessity during exceptionally harsh weather and accordingly the probability of survival is expanded. As the winter seasons bring about loss of leaf cover, the danger of predation is high. In this manner, the squirrels are less active (goes to hibernate mode) and decrease their foraging trips during such situations. During the ending of winter season, they are back to ordinary and become active in order to search food for their survival. The above process is repeated all through their lifecycle and this cyclic process prompts the establishment of SSA.
In the numerical model of SSA, a portion of the assumptions are made as of:  Total count of squirrels is ' M ' and everyone is thought to be on one tree.
In above equation, each value D i S , represents the location of th i squirrel in th D dimension.
Also, the random location of squirrels is allocated based on uniform distribution function applied within the minimum min S and maximum max S range of th l squirrel in th k dimension is given as, is the uniformly distributed arbitrary number within range   1 ,

.
Fitness evaluation: During this stage, the fitness of each and every solution is evaluated. In this work, two objective functions are defined to attain the optimal Q, R, Ki, Kd and Kp. The fitness calculation is given as,  Sort, declare and random select process: Once after finding the fitness values of every solution (i.e. squirrel's location), the values are sorted in ascending order. It is considered that the fittest position is recognized as to be on hickory nut tree. Also, the subsequent three best solutions are assumed to be on acorn nuts trees and the squirrels tries to go in the direction of the hickory nut tree. Left over squirrels is assumed to be on normal trees. Once the declaration step is done, a random selection process is done to choose some squirrels to travel towards the hickory nut tree. However, all the squirrels are affected by predators and thus the algorithm is modelled based on the predator presence probability ( prob p ).

Generate new locations:
Once the assumptions about the flying squirrels are made at the declaration stage, the dynamic foraging behaviour based on the predator presence probability ( prob p ) is mathematically formulated as follows,  Aerodynamics of gliding: Gliding mechanism is illustrated by the resultant force produced by the lift ( E ) and drag ( d ) force of the flying squirrels. Thus, the lift-to-drag ratio (also termed as, glide ratio) of the flying squirrel gliding at steady speed descending at horizontal angle is defined as, In above equation,  represents the glide angle, and can be given as, Here, the lower value of  helps in increasing the glide path length of the squirrels. Moreover, the lift force generated from the downward deflection of air flowing through the wings is given as, Further, the frictional drag is given as, represents the density of air;

Flying squirrels itself explores for optimal food source
Random relocation during winter season: Based on the seasonal monitoring condition, the active squirrels that are able to explore their optimal food source are found. Moreover, the squirrels which are still survived but cannot explore are also found and made to explore their optimal food source from the random relocation strategy. Here, the random relocation is based on the levy flight distribution method that can be formulated as Stopping criterion: Stopping criterion is made when the optimal solution is found or the maximum count of iterations is attained. At the end of SSA, the optimal parameters are found, which are then applied to the LQR-PID for estimating optimal control signal.

Maximum iteration 100
Search extent     Table 5: Power consumption of manipulator with different algorithms based LQR-PID controller

Performance analysis of optimized LQR-PID controller for six joint angles
As per the joint angles of 6-DOF manipulator, average joint velocity of different algorithms based LQR-PID controller is analyzed in figures 1-10. Figure

Methods
To attain the desired trajectory for 6-DOF parallel manipulator, an optimized LQR-PID controller has been presented in this paper. The parameters Q, R, Ki, Kd and Kp of LQR-PID controller are optimally chosen using SSA algorithm. Because of the optimized LQR-PID controller, the motor has generated optimal torque. The optimal torque has helped to obtain the desired trajectory for 6-DOF parallel manipulator. The execution of the SSA based LQR-PID controller has been analyzed in terms of mean velocity, SSE, ISE and IAE. Besides, the performance of SSA based LQR-PID controller is compared with that of LQR-PID controller based on GWO, PSO and GA.