A Robotic Drilling End-Effector and Its Sliding Mode Control for the Normal Adjustment

Laixi Zhang 1 , Jaspreet Singh Dhupia 2,*, Mingliang Wu 1 and Hua Huang 1 1 School of Mechanical & Electronical Engineering, Lanzhou University of Technology, Lanzhou 730050, China; laixi_zh@163.com (L.Z.); wml0757@163.com (M.W.); hh318872@126.com (H.H.) 2 Department of Mechanical Engineering, University of Auckland, Private Bag 92019, Auckland 1142, New Zealand * Correspondence: j.dhupia@auckland.ac.nz; Tel.: +64-9-9235915


Introduction
Robots have undoubtedly demonstrated their value in the automotive industry, they have been regarded suitable for aerospace applications such as drilling and fastening due to the obvious low investment costs compared to bespoke industrial solutions [1].The traditional application areas for industrial robots involve highly repetitive operations such as drilling.Robotic drilling system has made extensive application in both industry and research field.In the aircraft industry, where the drilling of many thousands of holes per aircraft is needed, the usually adopted solution is to stack the parts in a joint position and drill them in a single operation [2,3].The use of industrial robots for drilling is gaining an increasing interest due to their flexibility and the comparatively low cost of industrial robot systems [4,5].DeVlieg et al. [6] and Atkinson et al. [7] developed a drilling system for the skin to substructure joint on the F/A-18E/F Super Hornet wing trailing edge flaps (TEF) and for 737 Aileron, which utilizes a mass produced, high capacity industrial robot such as Kuka KR350/2 and KR360-2 as the motion platform for an automated drilling, countersinking, and hole inspection machine.
In general, a servo-controlled robotic drilling end-effector is coupled with an industrial robot to complete the drilling process.Webb et al. [8] developed a compact and innovative end-effector which is capable of performing drilling, countersinking, sealing and riveting operations and also contains a significant amount of process monitoring sensors to enable automated in-process checks and quality measurement.Hempstead et al. [9] developed an end-effector for use on a Kuka KR350 robot.The end-effector pushes up on a wing panel with programmable pressure, drills a hole with a servo drill, inspects the hole with a servo ball-type hole gauge and then drives a pin-tail style lock bolt into the hole.Liang et al. [10] further designed a drilling end-effector to use for industrial robots.The real-time force feedback can detect dull or broken bits, drill to breakthrough, and plot thrust force while drilling.Devlieg [11] also developed a single process end-effector that performs all required functions, including one-sided pressure application, touch probing, barcode scanning, drilling/countersinking, measurement of hole diameter and countersink depth, and face milling.Automatic drilling requires the drilling bit to be perpendicular to the curved surface of fuselage.However, most of these references focus exclusively on all-in-one end-effector structure design and functions such as drilling, countersinking, inspecting or monitoring, and fastening [12], and a few on the normal adjustment dynamical model and control.The development of these robotic drilling systems has created a research need for the dynamical models and control of the normal adjustment of robotic drilling end-effector.
The dynamic performance of the normal adjustment of the robotic drilling end-effector will affect the drilling quality and productivity.Olsson [13] presented methods and systems for force-controlled robot drilling, based on active suppression of drill sliding through a model-based force control scheme.Tian et al. [14] proposed a novel approach based on the detection system to detect the normal vector to product surface in real time for the robotic precision drilling system in aircraft component assembly.Mei et al. [15] proposed a novel in-process robot base frame calibration method with a 2D vision system to measure and compensate the position errors of drilled fastener holes.Frommknecht [16] presented a multi-sensor measurement system for robotic drilling.The system enables a robot to measure its 6D pose with respect to the work piece and to establish a reference coordinate system for drilling.Shi et al. [5] developed a normal adjustment cell (NAC) in aero-robotic drilling by using an intelligent double-eccentric disk normal adjustment mechanism (2-EDNA), a spherical plain bearing, and a floating compress module with sensors to improve the quality of vertical drilling.Qin et al. [17] presented an approach for the acquisition of vibration signals of the end-effector in robotic drilling.With the aid of the rigid body kinematics, the vibration signals of the end-effector can be obtained and analyzed.Garnier et al. [18] proposed two robotic drilling models, in which the cutting process and the stiffness of the robot hand are taken into account, respectively.However, these efforts focus basically on kinematics analysis and static accuracy insurance, depending quite a bit on sensors.Though Zhang et al. [19] proposed an intelligent surface-normal adjustment system to deal with the normal adjustment that focused on calculating surface-normal vector to regulate the feed direction of the drilling bit in real-time, this works didn't involve the dynamic characteristics of the normal adjustment of the end-effector.
This paper develops a robotic drilling end-effector for industrial robot.Based on the dynamics modeling and analysis, a sliding mode variable structure control architecture with the constant plus exponential rate reaching law is proposed for the normal adjustment dynamic control.By using a third-order nonlinear integration chain differentiator for obtaining the unmeasurable speed and acceleration signals from the position signals with the minimum noise, this sliding mode control scheme is developed with good dynamic quality.The new control law ensures global stability of the entire system and achieves both stabilization and tracking within a desired precision.A real-time control experiment platform is established in xPC target environment based on MATLAB Real-Time Workshop (RTW) to verify the proposed control scheme and simulation results.Simulations and experiments performed on the designed robotic end-effector illustrate and clarify that the controller is effective and robust.

The Structure of the Robotic Drilling End-Effector
The main functions of the designed robotic drilling end-effector include: measuring and calculating the outward normal of the fuselage surface at drilling point, adjusting spindle axis to coincide with the normal and drilling after the surface is reliably compressed.A diagram and a photograph of the designed robotic drilling end-effector are shown in Figure 1. Figure 1a shows a diagram of the end-effector structure, Figure 1b shows the specifics of the internal structure of the end-effector, and Figure 1c shows the prototype of the end-effector, in which the spindle and feed units fulfill spindle driving and feeding.The compressing unit compresses the surface to diminish the vibration during the drilling process.It also helps to eliminate the clearances between the layers of material in order to avoid chips going into layers and causing stress concentration.There are four displacement sensors arranged evenly in the compressing unit around the spindle for measuring four space coordinates on the surface around drilling area.Thus, by the proposed method of measuring and calculating the normal of curved surface [19], the outward normal of fuselage surface at drilling point is obtained.The normal adjusting unit is fixed on the frame, and two mutually perpendicular axes (Joints 1 and 2) are installed in a plane normal to the spindle.The spindle can rotate about these two axes, thus fulfilling the function of adjusting the spindle to normal of the surface.The frame links and supports above parts, and connects the end-effector to robot.diagram of the end-effector structure, Figure 1b shows the specifics of the internal structure of the end-effector, and Figure 1c shows the prototype of the end-effector, in which the spindle and feed units fulfill spindle driving and feeding.The compressing unit compresses the surface to diminish the vibration during the drilling process.It also helps to eliminate the clearances between the layers of material in order to avoid chips going into layers and causing stress concentration.There are four displacement sensors arranged evenly in the compressing unit around the spindle for measuring four space coordinates on the surface around drilling area.Thus, by the proposed method of measuring and calculating the normal of curved surface [19], the outward normal of fuselage surface at drilling point is obtained.The normal adjusting unit is fixed on the frame, and two mutually perpendicular axes (Joints 1 and 2) are installed in a plane normal to the spindle.The spindle can rotate about these two axes, thus fulfilling the function of adjusting the spindle to normal of the surface.The frame links and supports above parts, and connects the end-effector to robot.

Motion Equations of the Robotic Drilling End-Effector
The coordinate system of the designed robotic drilling end-effector is shown as Figure 2. The kinematic model is established using Denavit-Hartenberg (D-H) method.The base coordinate system is placed in rotating Joint 1 and concentric exactly with joint coordinate {1}.Because the normal adjustment unit of the end-effector consists of Joints 1 and 2, the world frame {0} is placed at the center of the Joint 1 and is concentric with the frame {1} for the sake of analysis.

Motion Equations of the Robotic Drilling End-Effector
The coordinate system of the designed robotic drilling end-effector is shown as Figure 2. The kinematic model is established using Denavit-Hartenberg (D-H) method.The base coordinate system is placed in rotating Joint 1 and concentric exactly with joint coordinate {1}.Because the normal adjustment unit of the end-effector consists of Joints 1 and 2, the world frame {0} is placed at the center of the Joint 1 and is concentric with the frame {1} for the sake of analysis.
Appl.Sci.2018, 8, x 4 of 17 The transform matrixes in the coordinate system are calculated as: Both spindle feeding unit and pressing unit will not move in the normal adjusting process of the end-effector.Thus, both their acceleration and velocity are 0.
A 3 × 3-order positive definite inertial matrix is calculated as:   with      The transform matrixes in the coordinate system are calculated as: Both spindle feeding unit and pressing unit will not move in the normal adjusting process of the end-effector.Thus, both their acceleration and velocity are 0.
A 3 × 3-order positive definite inertial matrix is calculated as: Appl.Sci.2018, 8, 1892 5 of 17 where θ 1 and θ 2 denote the rotation angles of the Joints 1 and 2, respectively, and d 3 denotes the linear displacement of the prismatic Joint 3. I abi is the product of inertia of Joint i with respect to a pair of orthogonal axes a and b, a, b denote x, y, or z; m i is the mass of Joint i. c ai is the centroid coordinate of Joint i on axis a, a denote x, y, or z.
A 3 × 1-order vector of centrifugal and Coriolis force is calculated, regarding that .q 3 = .
d 3 = 0, the result is: with (16) A 3 × 1-order gravity vector is calculated as: with According to Lagrange's equation, the dynamical equation of the end-effector is derived as: where τ 1 and τ 2 denote the torque acting on Joints 1 and 2, respectively, f 3 denotes the force acting on prismatic Joint 3. The joint parameters of the end-effector calculated by the model are listed in Table 1.

Friction Compensation
In order to research dynamical characteristic of the end-effector during normal orientation adjusting, considering that feed unit and compressing unit maintain resting state during the normal adjusting process, Equation ( 23) is rewritten as: where 25) is an ideal dynamical model, because it didn't take into account the effects of friction torque and disturbing torque on the joints.Friction is a phenomenon with obvious nonlinearity that remains ubiquitous in mechanical systems.It always causes untoward consequences such as system steady-state error, limit cycle, static-slip and oscillation.Therefore, the friction torque and disturbing torque should be considered to obtain comparative control quality.The dynamical model needs to be modified as: where F Θ, .
Θ denotes friction torque while τ d denotes disturbing torque.
Therefore, in order to compensate the friction torque, it is necessary to establish a friction model to estimate the friction torque.Stribeck model is a classical friction model which has components that are either linear in velocity or constant and describes the mechanical characteristics of various friction stages.The resulting friction force F f can be expressed as [20]: 27) where v is motion velocity; v s is named Stribeck velocity; F e denotes driving force; F s denotes maximum static friction force; F c denotes Coulomb friction force; F v denotes viscous frictional torque coefficient.
It is easy to identify the expression for F f by measuring friction force in condition of uniform motion.

Sliding Mode Control Based on Model
Utilizing controller decomposition, a dynamic control law combining the linearized feedback of joints' parameters and servo compensator is investigated.The feedback linearization method which is often called computed torque method is a kind of design method based on system dynamical model.Define the driving torque as Equation (29).
A sliding mode control based on reaching law is designed according to the dynamical model.The switch function is taken as: where , and e = diag(e 1 , e 2 ) is the position tracking error matrix, e 1 and e 2 are the tracking error of the Joints 1 and 2, respectively.Because S = 0 denotes the sliding mode surface and the state of the phase trajectory moving along the sliding mode surface, only S = 0 is considered.
To demonstrate the stability of the designed controller, a Liapunov's function is made as: The first-order derivative of Equation ( 32) is calculated as: Using switch law can ensure the dynamic quality of the phase trajectory during reaching segment by designing the change rate function of the switch function of reaching segment.This method makes the system reach the sliding surface quickly according to the dynamical characteristic of the change rate function .

s.
The constant plus exponential rate reaching law combines the advantages of both constant rate reaching law and exponential rate reaching law and has good dynamic characteristics that make the system reach the sliding surface quickly and eliminate system chattering effectively.The constant plus exponential rate reaching law is expressed as [21]: By derivation of Equation ( 32) and then substituting Equation (31) into it, the change rate function can be acquired as: (37) Thus, the stability of the control law is verified.Through the aforementioned method of calculation, it is obvious that the control law expressed by Equation ( 38) is in accord with Liapunov stability theorem.The control block diagram of the sliding mode variable structure control based on the model with friction compensation and gravity compensation is shown as Figure 3.The output control quality u of a servo compensator with the sliding mode variable structure acts as the input of the linearizing compensator.The final output torque τ of the controller can be deduced by substituting Equation (38) into Equation ( 29) as: Appl.Sci.2018, 8, x 8 of 17 Substituting Equations ( 32) and (35) into Equation (34), we can obtain that: Thus, the stability of the control law is verified.Through the aforementioned method of calculation, it is obvious that the control law expressed by Equation ( 38) is in accord with Liapunov stability theorem.The control block diagram of the sliding mode variable structure control based on the model with friction compensation and gravity compensation is shown as Figure 3.The output control quality u of a servo compensator with the sliding mode variable structure acts as the input of the linearizing compensator.The final output torque τ of the controller can be deduced by substituting Equation (38) into Equation ( 29) as:

Nonlinear Integration Chain Tracking-Differentiator
In order to realize the control law expressed by Equation (38), the position error change ratio of the joints, the speed error, and the acceleration of the joints must be known.In general, the photoelectrical encoders installed in the joints are displacement sensor.Theoretically, the speed signal can be obtained only by taking the first-order derivative of the displacement signal, and the acceleration signal by the second-order derivative.But only the signal expressed by analytic formula can be used for mathematically calculating its first or higher orders derivatives.The signal measured by sensor cannot be mathematically taking the derivatives because it has no analytic formula.In engineering, difference method is often used to approximate the derivatives of signal.Because the signal measured by sensor usually contains disturbances which will be further amplified after difference, the approximated first derivative signal usually intermingles with strong disturbances, and the approximated second derivative signal even can be submerged by disturbances.Much of the disturbances can be eliminated with digital filter such as Butterworth, Chebyshev, and Bessel et al. after difference, but this method unfortunately has obvious drawbacks such as time delay and nonlinear phase shift which will impact the control accuracy and even bring up system distortion or disability.The optimal estimation of the system state can be obtained from the observation equations using Kalman filter or other state observation methods such as time delay system observer [22], discrete-time system observer [23], sliding mode observer [24], and so on, but the observation equations are based on the object model, which limits its application.Extracting the derivatives of real-time signals is a common problem.For the signals that are encountered in practical applications, developing the differentiator to take derivative is a realistic option [25].The general structure of the differentiator is expressed as:

Nonlinear Integration Chain Tracking-Differentiator
In order to realize the control law expressed by Equation (38), the position error change ratio of the joints, the speed error, and the acceleration of the joints must be known.In general, the photoelectrical encoders installed in the joints are displacement sensor.Theoretically, the speed signal can be obtained only by taking the first-order derivative of the displacement signal, and the acceleration signal by the second-order derivative.But only the signal expressed by analytic formula can be used for mathematically calculating its first or higher orders derivatives.The signal measured by sensor cannot be mathematically taking the derivatives because it has no analytic formula.In engineering, difference method is often used to approximate the derivatives of signal.Because the signal measured by sensor usually contains disturbances which will be further amplified after difference, the approximated first derivative signal usually intermingles with strong disturbances, and the approximated second derivative signal even can be submerged by disturbances.Much of the disturbances can be eliminated with digital filter such as Butterworth, Chebyshev, and Bessel et al. after difference, but this method unfortunately has obvious drawbacks such as time delay and nonlinear phase shift which will impact the control accuracy and even bring up system distortion or disability.The optimal estimation of the system state can be obtained from the observation equations using Kalman filter or other state observation methods such as time delay system observer [22], discrete-time system observer [23], sliding mode observer [24], and so on, but the observation equations are based on the object model, which limits its application.Extracting the derivatives of real-time signals is a common problem.For the signals that are encountered in practical applications, developing the differentiator to take derivative is a realistic option [25].The general structure of the differentiator is expressed as: .
Under the condition of existence of the solution of Equation (41), make x 1 converges to input signal v(t) and x 2 converges to desired derivative .

v(t).
To solve the engineering questions, researchers proposed many practical differentiators such as linear high gain differentiator [26], sliding mode differentiator [27], hybrid differentiator [28], nonlinear integration chain differentiator [29], and so on.Adopted in this experiment is a third-order nonlinear integration chain differentiator which has multiple integration structure and high disturbance suppression performance and its form is expressed as Equation (42) [30].
where x = x 1 x 2 x 3 T are the system state variables, and sig(x)α = |x| α sgn(x).In the following experiments, x 1 , x 2 , and x 3 correspond to joint positions, velocities, and accelerations, respectively.
The parameters of the Stribeck friction model are selected as listed in Table 2.
The simulation results of the control law of sliding mode controller expressed by Equation (38) with the above parameters on step input are shown in Figures 4 and 5 and on sinusoid input are shown in Figures 6 and 7. A classical PID (proportional-integral-derivative) controller was also designed for comparison.The values of proportional, integral, and derivative gains of Joint 1 were P 1 = 102, I 1 = 1.2, and D 1 = 21.5, and the control parameters of Joint 2 were P 2 = 87, I 2 = 0.7, and D 2 = 15.These values have been optimally tuned using a modified Ziegler-Nichols' (Z-N) tuning methods [31].
Figure 4 shows the step responses of Joint 1 with the proposed SMC and the PID controller.Figure 4a shows the position tracking with PID controller and the SMC. Figure 4b shows the phase trajectory diagram of the SMC. Figure 4c,d shows the tracking error with PID controller and the SMC, respectively.Figure 5 shows the step responses of Joint 2.
For step input, the adjusting times of both joints with the proposed SMC and the PID controller are only 0.2 s.However, the position steady state error of each joint with the SMC is far less than that with the PID controller.As shown in Figures 4c,d and 5c,d, the tracking errors generated by the PID controller oscillate more intensely than that by the SMC.This phenomenon implies that the SMC possess better control accuracy and stronger robustness under disturbances than the PID.The phase trajectory of the SMC rapidly reaches the sliding mode surface from the initial point and quickly converges along the sliding mode surface to the equilibrium point.This illustrates that the designed SMC has good dynamic quality and uniform stability.possess better control accuracy and stronger robustness under disturbances than the PID.The phase trajectory of the SMC rapidly reaches the sliding mode surface from the initial point and quickly converges along the sliding mode surface to the equilibrium point.This illustrates that the designed SMC has good dynamic quality and uniform stability.Figure 6 shows the sinusoidal responses of Joint 1 with the proposed SMC and the PID controller.Figure 6a shows the position tracking with PID controller and the SMC. Figure 6b shows the phase trajectory diagram of the SMC. Figure 6c,d shows the tracking error with PID controller and the SMC, respectively.Figure 7 shows the sinusoidal responses of Joint 2.
For sinusoidal input, as show in Figures 6 and 7, an obvious lag or steady error is presented in the trajectory produced by the PID controller, which suffers from some difficulties in obtaining accurate tracking.The position tracking error of each joint with the PID controller oscillates more greatly than that with the SMC.The existence of this phenomenon suggests again that the SMC has Appl.Sci.2018, 8, x 10 of 17 possess better control accuracy and stronger robustness under disturbances than the PID.The phase trajectory of the SMC rapidly reaches the sliding mode surface from the initial point and quickly converges along the sliding mode surface to the equilibrium point.This illustrates that the designed SMC has good dynamic quality and uniform stability.Figure 6 shows the sinusoidal responses of Joint 1 with the proposed SMC and the PID controller.Figure 6a shows the position tracking with PID controller and the SMC. Figure 6b shows the phase trajectory diagram of the SMC. Figure 6c,d shows the tracking error with PID controller and the SMC, respectively.Figure 7 shows the sinusoidal responses of Joint 2.
For sinusoidal input, as show in Figures 6 and 7, an obvious lag or steady error is presented in the trajectory produced by the PID controller, which suffers from some difficulties in obtaining accurate tracking.The position tracking error of each joint with the PID controller oscillates more greatly than that with the SMC.The existence of this phenomenon suggests again that the SMC has better dynamic and static characteristic than the PID, and has high accuracy and stronger robustness.Figure 6 shows the sinusoidal responses of Joint 1 with the proposed SMC and the PID controller.Figure 6a shows the position tracking with PID controller and the SMC. Figure 6b shows the phase trajectory diagram of the SMC. Figure 6c,d shows the tracking error with PID controller and the SMC, respectively.Figure 7 shows the sinusoidal responses of Joint 2.
For sinusoidal input, as show in Figures 6 and 7, an obvious lag or steady error is presented in the trajectory produced by the PID controller, which suffers from some difficulties in obtaining accurate tracking.The position tracking error of each joint with the PID controller oscillates more greatly than that with the SMC.The existence of this phenomenon suggests again that the SMC has better dynamic and static characteristic than the PID, and has high accuracy and stronger robustness.As shown in Figures 6b and 7b, the phase trajectory rapidly reaches the sliding mode surface and quickly tends along the sliding mode surface to a tiny stable limit cycles around the equilibrium point.This illustrates that the designed sliding mode variable control has bounded stability.And the existence of the limit cycle implicates that the system has small steady state error.quickly tends along the sliding mode surface to a tiny stable limit cycles around the equilibrium point.This illustrates that the designed sliding mode variable control has bounded stability.And the existence of the limit cycle implicates that the system has small steady state error.The simulation results show that the influences of the friction torque and disturbances of the load torque and inertia are effectively suppressed by sliding mode variable structure control which has a strong adaptive ability to input signals.quickly tends along the sliding mode surface to a tiny stable limit cycles around the equilibrium point.This illustrates that the designed sliding mode variable control has bounded stability.And the existence of the limit cycle implicates that the system has small steady state error.The simulation results show that the influences of the friction torque and disturbances of the load torque and inertia are effectively suppressed by sliding mode variable structure control which has a strong adaptive ability to input signals.The simulation results show that the influences of the friction torque and disturbances of the load torque and inertia are effectively suppressed by sliding mode variable structure control which has a strong adaptive ability to input signals.

Establishment of Real-Time Experiment Platform
The key to validation of the dynamical model and the designed controller is to establish a reliable real time control system which has the characteristics of rapid response speed, flexibility, and low hardware cost.MATLAB provides a real-time development environment to achieve system simulation and product rapid-prototype by adopting the RTW (Real-Time Workshop) toolbox.RTW can automatically transform the model into dynamic system model code running on the hardware to realize real-time simulation and control.
xPC target environment adopts the Host-Target pattern.The Host is used for running Simulink model, compiling and generating executable code and then downloading it to the Target, it can also monitor and control the Target.The target is used for running executable code by installing highly optimized real-time kernel of 32-bit protected mode.The Host communicates with the Target using RS232 serial port or ethernet [32,33].The real-time control experiment platform based on RTW xPC target environment is shown in Figure 8.

Establishment of Real-Time Experiment Platform
The key to validation of the dynamical model and the designed controller is to establish a reliable real time control system which has the characteristics of rapid response speed, flexibility, and low hardware cost.MATLAB provides a real-time development environment to achieve system simulation and product rapid-prototype by adopting the RTW (Real-Time Workshop) toolbox.RTW can automatically transform the model into dynamic system model code running on the hardware to realize real-time simulation and control.
xPC target environment adopts the Host-Target pattern.The Host is used for running Simulink model, compiling and generating executable code and then downloading it to the Target, it can also monitor and control the Target.The target is used for running executable code by installing highly optimized real-time kernel of 32-bit protected mode.The Host communicates with the Target using RS232 serial port or ethernet [32,33].The real-time control experiment platform based on RTW xPC target environment is shown in Figure 8.In the experiment, an Advantech PCL-726 analog output card is used for output of the control signal, and an MCX312 motion control card is used for collecting the position signal from the encoder.PLC-726 can be directly driven by the corresponding module in the I/O module library of xPC target.MCX312 isn't included in the module library and its driver must be written.In the target system, the device driver must be written using C MEX S function which is a kind of S function written using C. Figure 9 shows the display of the RTW real-time experiment platform.

Experiments Results and Discussion
The symbolic function in the variable structure control expressed by Equation ( 38) is replaced by the saturation function to design quasi-sliding mode controller for reducing the chattering which is brought naturally by the sliding mode variable structure control in the experimental system.The new control law is expressed as: In the experiment, an Advantech PCL-726 analog output card is used for output of the control signal, and an MCX312 motion control card is used for collecting the position signal from the encoder.PLC-726 can be directly driven by the corresponding module in the I/O module library of xPC target.MCX312 isn't included in the module library and its driver must be written.In the target system, the device driver must be written using C MEX S function which is a kind of S function written using C. Figure 9 shows the display of the RTW real-time experiment platform.

Establishment of Real-Time Experiment Platform
The key to validation of the dynamical model and the designed controller is to establish a reliable real time control system which has the characteristics of rapid response speed, flexibility, and low hardware cost.MATLAB provides a real-time development environment to achieve system simulation and product rapid-prototype by adopting the RTW (Real-Time Workshop) toolbox.RTW can automatically transform the model into dynamic system model code running on the hardware to realize real-time simulation and control.
xPC target environment adopts the Host-Target pattern.The Host is used for running Simulink model, compiling and generating executable code and then downloading it to the Target, it can also monitor and control the Target.The target is used for running executable code by installing highly optimized real-time kernel of 32-bit protected mode.The Host communicates with the Target using RS232 serial port or ethernet [32,33].The real-time control experiment platform based on RTW xPC target environment is shown in Figure 8.In the experiment, an Advantech PCL-726 analog output card is used for output of the control signal, and an MCX312 motion control card is used for collecting the position signal from the encoder.PLC-726 can be directly driven by the corresponding module in the I/O module library of xPC target.MCX312 isn't included in the module library and its driver must be written.In the target system, the device driver must be written using C MEX S function which is a kind of S function written using C. Figure 9 shows the display of the RTW real-time experiment platform.

Experiments Results and Discussion
The symbolic function in the variable structure control expressed by Equation ( 38) is replaced by the saturation function to design quasi-sliding mode controller for reducing the chattering which is brought naturally by the sliding mode variable structure control in the experimental system.The new control law is expressed as:

Experiments Results and Discussion
The symbolic function in the variable structure control expressed by Equation ( 38) is replaced by the saturation function to design quasi-sliding mode controller for reducing the chattering which is brought naturally by the sliding mode variable structure control in the experimental system.The new control law is expressed as: where ∆ is the boundary layer, and ∆ = 0.05.
Experiments are carried out with the PID and the SMC controller respectively by applying a five-degree step input and a sinusoid input r = 5sin(0.5πt)to both of the Joints 1 and 2 in the same time.Figures 10 and 11 show the step responses of the Joints 1 and 2, respectively.Figures 12 and 13 show the sinusoid responses of the Joints 1 and 2, respectively.
where ∆ is the boundary layer, and ∆ = 0.05.
Experiments are carried out with the PID and the SMC controller respectively by applying a five-degree step input and a sinusoid input r = 5sin(0.5πt)to both of the Joints 1 and 2 in the same time.Figures 10 and 11 show the step responses of the Joints 1 and 2, respectively.Figures 12 and 13 show the sinusoid responses of the Joints 1 and 2, respectively.
where ∆ is the boundary layer, and ∆ = 0.05.
Experiments are carried out with the PID and the SMC controller respectively by applying a five-degree step input and a sinusoid input r = 5sin(0.5πt)to both of the Joints 1 and 2 in the same time.Figures 10 and 11 show the step responses of the Joints 1 and 2, respectively.Figures 12 and 13 show the sinusoid responses of the Joints 1 and 2, respectively.For step input, as shown in Figures 10a and 11a, the adjusting times of both joints with the proposed SMC and the PID controller are almost the same.However, the position steady state error of each joint with the SMC is far less than that with the PID controller, which is similar to the simulation results.As shown in Figure 10c,d, and Figure 11c,d, the tracking errors produced by the PID controller has higher oscillation amplitude than that by the SMC.This means that the SMC is more robust and accurate than the PID.As show in Figures 10b and 11b, both of the phase trajectories of the SMC converge to stable limit cycles, this implicates that the system yields bounded stability based on sliding mode variable structure control.In order to accelerate the trajectory reaching to the sliding mode surface and improve the system dynamic quality during the experiment, the values of the parameter C of the switch function and the proportional gain K are set bigger.This causes in initial response that the phase trajectory generates obvious chatter along the sliding mode surface.
of each joint with the SMC is far less than that with the PID controller, which is similar to the simulation results.As shown in Figures 10c,d, and 11c,d, the tracking errors produced by the PID controller has higher oscillation amplitude than that by the SMC.This means that the SMC is more robust and accurate than the PID.As show in Figures 10b and 11b, both of the phase trajectories of the SMC converge to stable limit cycles, this implicates that the system yields bounded stability based on sliding mode variable structure control.In order to accelerate the trajectory reaching to the sliding mode surface and improve the system dynamic quality during the experiment, the values of the parameter C of the switch function and the proportional gain K are set bigger.This causes in initial response that the phase trajectory generates obvious chatter along the sliding mode surface.
For sinusoid input, as show in Figures 12 and 13, the position tracking experiment results of both of the Joints 1 and 2 with PID controller have obvious lag in contrast to that with the SMC, which suggests that the system with the SMC has higher tracking accuracy than that with the PID controller.
As shown in Figures 12b and 13b, both of the phase trajectories converge to limit cycles around the equilibrium point, this implicates that the system based on the SMC gains bounded stability and has certain steady state errors.For the reason, the x-axis and y-axis have different coordinate ranges, both of the limit cycles look tabular.Actually, if the x-axis and y-axis have the same ranges, both of the limit cycles will appear more slim, which implicates that the speed errors are larger than the position errors.

Conclusions
In robotic control systems, nonlinearity and disturbances such as friction and differential signal may severely limit the performance of control.In this paper, a sliding mode variable structure control architecture is proposed for the normal adjustment of a designed robotic drilling end-effector.By using computation torque control and by adopting a third-order nonlinear integration chain For sinusoid input, as show in Figures 12 and 13, the position tracking experiment results of both of the Joints 1 and 2 with PID controller have obvious lag in contrast to that with the SMC, which suggests that the system with the SMC has higher tracking accuracy than that with the PID controller.
As shown in Figures 12b and 13b, both of the phase trajectories converge to limit cycles around the equilibrium point, this implicates that the system based on the SMC gains bounded stability and has certain steady state errors.For the reason, the x-axis and y-axis have different coordinate ranges, both of the limit cycles look tabular.Actually, if the x-axis and y-axis have the same ranges, both of the limit cycles will appear more slim, which implicates that the speed errors are larger than the position errors.

Conclusions
In robotic control systems, nonlinearity and disturbances such as friction and differential signal may severely limit the performance of control.In this paper, a sliding mode variable structure control architecture is proposed for the normal adjustment of a designed robotic drilling end-effector.By using computation torque control and by adopting a third-order nonlinear integration chain differentiator for obtaining the speed and acceleration signals from the position signals, this sliding mode control scheme is developed with good dynamic quality.The new control law ensures global stability of the entire system and achieves both stabilization and tracking within a desired precision.A real-time control experiment platform is developed in xPC target environment based on MATLAB RTW to verify the proposed control scheme and simulation results.The experimental results prove that the proposed sliding mode control strategy is effective and robust with regard to external disturbances.The proposed controller is successfully tested on the normal adjustment of the robotic drilling end-effector.This research provides a solution for the more accurate control of robotic drilling on the curved surface of an airplane.

FeedFigure 1 .
Figure 1.Structure and prototype of the designed end-effector: (a) the diagram of the end-effector structure; (b) the specific of the internal structure of the end-effector; and (c) the prototype of the end-effector.

Figure 1 .
Figure 1.Structure and prototype of the designed end-effector: (a) the diagram of the end-effector structure; (b) the specific of the internal structure of the end-effector; and (c) the prototype of the end-effector.

Figure 2 .
Figure 2. Coordination definition of the end-effector.

Figure 2 .
Figure 2. Coordination definition of the end-effector.

Figure 3 .
Figure 3.The sliding mode variable structure control block diagram.

Figure 3 .
Figure 3.The sliding mode variable structure control block diagram.

Figure 4 .
Figure 4. Simulation of step response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID (proportional-integral-derivative); and (d) Tracking error of SMC (sliding mode controller).

Figure 5 .
Figure 5. Simulation of step response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 4 .
Figure 4. Simulation of step response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID (proportional-integral-derivative); and (d) Tracking error of SMC (sliding mode controller).

Figure 4 .
Figure 4. Simulation of step response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID (proportional-integral-derivative); and (d) Tracking error of SMC (sliding mode controller).

Figure 5 .
Figure 5. Simulation of step response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 5 .
Figure 5. Simulation of step response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 6 .
Figure 6.Simulation of sinusoidal response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 7 .
Figure 7. Simulation of sinusoidal response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 6 .
Figure 6.Simulation of sinusoidal response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 6 .
Figure 6.Simulation of sinusoidal response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 7 .
Figure 7. Simulation of sinusoidal response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 7 .
Figure 7. Simulation of sinusoidal response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 8 .
Figure 8. Real-Time Workshop (RT W) xPC target real-time control platform principle diagram.

Figure 9 .
Figure 9.The display of the RTW real-time experiment platform.

Figure 8 .
Figure 8. Real-Time Workshop (RT W) xPC target real-time control platform principle diagram.

Figure 8 .
Figure 8. Real-Time Workshop (RT W) xPC target real-time control platform principle diagram.

Figure 9 .
Figure 9.The display of the RTW real-time experiment platform.

Figure 9 .
Figure 9.The display of the RTW real-time experiment platform.

Figure 10 .
Figure 10.Experiment of step response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 11 .
Figure 11.Experiment of step response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 10 .
Figure 10.Experiment of step response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 10 .
Figure 10.Experiment of step response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 11 .
Figure 11.Experiment of step response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 11 .
Figure 11.Experiment of step response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 12 .
Figure 12.Experiment of sinusoidal response of Joint 1: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Figure 13 .
Figure 13.Experiment of sinusoidal response of Joint 2: (a) Position tracking; (b) Phases trajectory diagram of SMC; (c) Tracking error of PID; and (d) Tracking error of SMC.

Table 1 .
Joint parameters of the end-effector.

Table 2 .
Parameters of the Stribeck friction model.