Abstract
In this article, we apply a result in equivalent errors to a contouring control problem of five degree of freedom robot manipulators. The proposed technique, fuzzy Proportional Integral Derivative (PID) with the robust extended Kalman filter, is employed to stabilize the dynamic of equivalent errors of robot manipulators. The shape of membership functions and rules of fuzzy PID controller are tuned following operating conditions that make the control performance to improve significantly. A desired path in terms of the position of the end-effector of the robot manipulators is described in generalized coordinates defined by the dynamic of equivalent. The simulation and experimental results demonstrate the excellent performance of the proposed technique.
Introduction
Nowadays, robot manipulators have increasingly played a role in manufacturing systems. They are employed to work in many situations for the required tasks. In particular, one of the important tasks in manufacturing systems requires robot manipulators to make its end-effector follow the specific path, such as applications in painting robot, welding robot, and machine tool systems. 1 –5 Actually, most of these tasks are so complicated that contouring control is subjected to the problem. For high-quality tasks, accuracy is the critical problem of contouring control for robot manipulators, especially under the operation in various environments. With respect to this aim, many researchers have developed various control techniques for the improvement in accuracy. Conventional techniques, for instance, PID control, 6 robust control and adaptive control, 7 and intelligent control, 8 have treated it as a tracking error problem, which concerns with the error between an actual position and a desired position. However, it does not imply that reducing tracking error means reducing contour error. 9
To emphasize directly the problem of contouring control, the cross-coupling control, which relies on the model of contour error, has been proposed. 10,11 It is successful to a linear dynamic system with a simple geometry path. Unfortunately, it is not suitable to apply this technique to a nonlinear system with a complicated path. To circumvent this difficulty, there are many works on using geometric property of paths to model the desired contours, such as linear and circular approximations. 12,13 Meanwhile, the simplified methods are also proposed, such as a polar or task coordinate approach. 14,15
However, these techniques will be particularly effective to a linear motion system with less than three axes (less than three degrees of freedom (DOF)). So, they will not be appropriated for contouring control problem of robot manipulators with DOF of more than three, which is usually high nonlinear dynamic systems. To overcome this limitation, the equivalent errors technique proposed by Chen and Wu 16 , for more details, is used to transform the desired path from task space to joint space in terms of the dynamic of equivalent error, which is considered as analytical coordinated transformation. Then, the equivalent error is employed in contouring controller design. So, this article is to mainly propose a designing of controller for a contouring control based on equivalent errors. In this article, a result of equivalent errors in terms of dynamic of equivalent errors is provided to be the control objective of the contouring control problem for 5-DOF robot manipulators. As a result, the control objective is considered the problem of stabilization. Consequently, the existing control techniques can be employed to design a controller for the control problem.
For this study, the proposed controller based on the fuzzy PID control 17 –19 tuned by robust extended Kalman filter (REKF) 20 –22 is considered that it can overcome the drawbacks of conventional fuzzy PID. Because of the adaptation of control parameters in control law, it can automatically redesign the controller when tasks or/and environments are changed. Moreover, REKF is employed to determine the parameters of membership functions (MFs) through a stochastic model. Consequently, not only the wide range of operation of robot manipulators will achieve but also noise or unknown uncertainty will not affect, especially at high speed.
The article is organized as follows. “Equivalent errors methodology” section describes the equivalent errors methodology. “Contouring control for robot manipulators-based equivalent errors” section presents the concepts of a contouring controller for 5-DOF robot manipulators by the method of equivalent errors. The adaptive and robust controller design is described in “Adaptive and robust controller design” section. “Simulated validations and experimental results” section shows the simulation and experiment to validate the performance of the proposed methods for contouring control of robot manipulators. Finally, the conclusion is remarked in the last section.
Equivalent errors methodology
The problem of contouring control of the n-axis motion systems is to minimize the contour error. Suppose that the contour error is the distance between an actual displacement
And, let
Actually, this concept has motivated a number of works to propose the techniques for the objective of control problem. Unfortunately, the drawbacks in most of those techniques are complicated, especially its application for multiaxis systems. To overcome those approaches, the equivalent errors are proposed, as graphically depicted in Figure 1, as in the study by Chen and Wu
16
for more details. Suppose that S is the desired path in a form of

Actual and equivalent errors.
where
As indicated in the study by Chen,
16
In addition to equivalent contour error, one can also obtain the tangential error, as graphically depicted in Figure 1, defined by
Consequently, the general form of equivalent errors is composed of the
Compared with equation (1), it is seen that ε in equation (3) is not complicated to subject to the problem of contour error. Moreover, it is noted that the desired algebraic path is more accurate than the approximation with geometrical techniques.
As presented in equation (5), the equivalent errors will be taken as the new coordinate to express the system dynamics that are constituted by path equations of command. The original generalized coordinate of the system will be transformed into equivalent errors, which are the new control objective.
Contouring control for robot manipulators-based equivalent errors
The schematic diagram of manipulator robot arm based on equivalent errors is depicted in Figure 2. Let a dynamic equation of robot manipulators be represented as

Contouring control for robot manipulators.
where
Here, the main task of robot manipulators is to make the end-effector follow the desired path. For this reason, a result in equivalent errors is accounted for the objective of contouring control problem.
Let a desired path in Cartesian space be represented by algebraic equations as
where
where
where
With the equivalent errors in hand, a control law is designed to obtain the objective of contouring controller. The system dynamic in equation (6) are transformed into the equivalent errors dynamic as follows
where
To design the contouring controller, let us consider
where v is considered to linearize the system with u, in which u is the control input to be designed. There are many control techniques for designing. Let, for example, a conventional PD controller PD be taken as
where
In general, it should be realized that robot manipulators might operate the task under various conditions that make an uncertainty. For this case, the dynamic of errors after feedback linearization can yield an uncertain model as
where
As in equations (16) and (17), they are indicated that prior information regarding the parameters of system/plant
Adaptive and robust controller design
Concept of fuzzy PID controller
Let us consider the general form of PID control algorithm, given as
where
Actually, due to the reasons in various operations or unknown environment, the control law is required to be more adaptive and robust than conventional PID as well as ISMC, as described in the previous section. To find the effective solution, thus, fuzzy control is used to perform automatically for tuning the parameters (gains) of PID in control law through fuzzy knowledge of plant.
In this study, PID parameters
where
Let error
where x is the input and
In the proposed fuzzy controller, let
where
where
where
As in equation (21), it is observed that the optimal value of
Based on optimal estimation, it is better to systematically consider the error between the system output and its reference as objective function in order to determine the optimal parameters through minimum/maximum estimation. Actually, it can guarantee global optima for obtaining the parameters in MFs. Let us consider the objective or cost function E, given as
where
Robust extended Kalman filter
Suppose the state of the system
22
at time
where
Let that the state function be considered for additive Gaussian noise 23,24 given as
with linearizing the state and measurement function
where
Considering
where
To bound large uncertainty and process noise, extended Kalman filter (EKF) will be considered accompanying with robust estimation based on Bayesian estimation, as in the studies by Lewis 22 and Masreliez and Martin 23 for more details.
So, the model in equations (28) and (29) will be considered as follows
where
The aforementioned posterior density function can be rewritten as
Application of the REKF to optimize the fuzzy PID controller
As motivated earlier, the parameters of MFs inputs,
The characteristic of state vector in a form of MFs parameters is expressed as
where n and m are the number of first and second inputs of fuzzy sets, respectively, and v is the number of weights.
Next, z in equation (33) and h in equation (34) are employed to denote the vector output of real system and the target vector output for the system, respectively. Hence, the nonlinear system model to which the REKF can be applied is described by
where
To ensure global optima in stability and asymptotically convergence, the process noise is accounted in system model associated with initial estimated state,
Let
Consequently, its characteristic is given by
As depicted in Figure 3, REKF for tuning the fuzzy PID parameters is detailed. In this case, the measurement functions in equations (30) and (31) can be determined using partial derivatives of the system output with respect to each parameters of fuzzy PID controller:

Internal components of REKF. REKF: robust extended Kalman filter.
First, the system output with respect to the weight of each fuzzy MFs is determined by
where
Second, the system output with respect to the center of each input MFs is determined by
Third, the system output with respect to the half widths of each input MFs is determined by
After getting the functions of measurement in equations (30) and (31), the parameters of fuzzy PID are automatically updated by robust estimator, as shown in Figure 3.
The simulation and experiment results in the next section will prove for this consideration.
Simulated validations and experimental results
The study establishes equivalent errors by the method of equivalent errors and employs the proposed technique for designing controller compared with conventional PD and ISMC.
Let
where

Coordinate system of 5-DOF robot manipulators. (a) 5-DOF robot manipulators. (b) 3-D printing and its details. (c) The coordinate systems. DOF: degree of freedom.
The goal is to make the end-effector follow a desired path, which is a curve starting from (0.049, 0.13, 0.41) to (0.09, 0.005, 0.46). It can be represented in a parametric form by non-uniform rational B-spline (NURBS)
25
where
As Sylvester’s implicitization method (S-L Chen, 2013, personal communication), the function of the desired path is given by
where all of the functions
With the forward kinematic in equations (52) to (54), the path function is obtained in the generalized coordinate q as follows
To generate the command
With equations (62) and (63), we can now apply the equivalent and tangential errors (5) to yield a contouring controller. Three controllers are designed with this approach; the first one is conventional PD controller given by equation (16), the second one is ISMC given by equation (17), and the last one is the proposed controller.
The parameters of conventional PD controller are set as
For the proposed controller, the block diagram is shown in Figure 5. Five triangle MFs are used for the parameters of PID indicating zero (ZE), very small (VS), small (S), medium (M), and big (B). The centroid of MFs is initiated at the same intervals and the same sizes in shape, as shown in Figure 6(a). The output

The proposed technique-based equivalent errors for robot manipulators.

MFs and output of fuzzy PID controller. (a) MFs for inputs e(t) and
Fuzzy rules for online tuning.
ZE: zero; VS: very small; S: small; M: medium; B: big.
For the following simulation, the setting parameters of the 5-DoF robot manipulators shown in Figure 5 are obtained from the real parameters, as listed in Table 2. Three cases of simulation are carried out to verify the performance of three different techniques: case I—without uncertainty, case II—with uncertainty, and case III—with uncertainty at high speed. For this study, average velocity of 0.65 m/s or 0.15 of c in equation (63) for normal speed and average velocity of 1.33 m/s or 0.3 of c in equation (63) for high speed are assumed.
Parameters of the length of links.
For the case without uncertainty at normal speed, the results of the trajectory of the end-effector are shown in Figure 7. As seen that trajectories with the conventional PD, ISMC, and the proposed technique are perfectly match the desired path. The trajectories of the end-effector with these controllers show a little deviation from the desired path. Clearly, it is seen in Figure 8 for tracking and in Figure 9 for contour error.

Trajectory of end-effector for 5-DOF robot manipulators without uncertainty. DOF: degree of freedom.

Tracking error for 5-DOF robot manipulators without uncertainty. DOF: degree of freedom.

Contour error for 5-DOF robot manipulators with uncertainty. DOF: degree of freedom.
However, although the conventional PD can yield good accuracy for contouring performance in the case of without uncertainty at normal speed, it may yield quite bad performance in the case of with uncertainty if a robust controller is not considered. As expected, the trajectory of the end-effector with conventional PID is quite bad to follow the desired path, but the proposed technique and ISMC still be perfect as seen in Figure 10. This can also be seen in terms of tracking and contour errors as depicted in Figures 11 and 12, respectively.

Trajectory of end-effector for 5-DOF robot manipulators with uncertainty. DOF: degree of freedom.

Tracking error for 5-DOF robot manipulators with uncertainty. DOF: degree of freedom.

Contour error for 5-DOF robot manipulators with uncertainty. DOF: degree of freedom.
Next, the case of uncertainty at high speed is considered. The results are depicted in Figure 13 for the trajectories of the end-effector, in Figure 14 for the tracking error, and in Figure 15 for contour error. As described in the previous section, the adaptation law of the proposed controller is able to cope both the unknown dynamic and operation at high frequency. The trajectory of the end-effector with the proposed technique is not subject to the uncertainty and the inaccuracy due to the increased speed in contrast to what is seen in both ISMC and conventional PD.

Trajectory of end-effector for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Tracking error for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Contour error for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.
Additionally, the performance of proposed controller is also validated with different paths: straight line and circular paths.
Let the desired straight line path be given as follows
And, the desired circular path is given as follows
We can now apply the equivalent errors (5) to yield a contouring controller; for the straight line path, equivalent errors are given as follows
For the circular path, equivalent errors are given as follows
where
As depicted in Figures 16 and 17, the paths with the proposed controller can perfectly follow the straight line and circular paths against to the uncertainty at high speed. As expected, no re-design for the proposed controller is considered when desired path is changed. More clearly, Figures 18 to 21 show the tracking error and contour error of both paths.

Trajectory of end-effector for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Trajectory of end-effector for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Tracking error for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Contour error for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Tracking error for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Contour error for 5-DOF robot manipulators with uncertainty at high speed.
Finally, in addition to the simulation, performance of three controllers is also investigated with the experiments in real robot manipulators, as shown in Figure 4. In this study, the straight line and circular paths are proposed to be the task of robot manipulators to follow.
For the straight line path, Figure 22 shows the trajectory of three controllers with uncertainty at high speed. As seen, the trajectory with the proposed controller can better perform than both ISMC and conventional PD controller. Actually, it is obvious that the contour error and tracking error with the proposed controller are less than the others, as depicted in Figures 23 and 24.

Experimental results of trajectory of end-effector for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Experimental results of tracking error for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Experimental results of contour error for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.
In addition, no re-designed controllers, the trajectory with the proposed controller can still be perfect to follow the circular path in contrast to what is seen in both ISMC and conventional PD, as depicted in Figures 25 to 27.

Experimental results of trajectory of end-effector for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Experimental results of tracking error for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.

Experimental results of contour error for 5-DOF robot manipulators with uncertainty at high speed. DOF: degree of freedom.
Clearly, the quantitative analysis is done on the responses as summarized in Table 3.
Numerical results of average contour errors.
ISMC: integral sliding mode controller.
Conclusion
The contouring control problem-based equivalent errors have been studied in this article. The technique of equivalent errors is proposed for 5-DOF robot manipulators, which is one of the multiaxis motion systems. The equivalent errors have been employed to design the contouring controller. For this study, the desired paths are a free-form curve generated by NURBS, straight line, and circular paths. Then, the proposed technique “fuzzy PID controller with REKF” is presented. The better performance and higher control precision are obtained by the conventional PID control combined with fuzzy sets whose shapes of MFs are automatically adapted using REKF algorithm.
The simulation and experiment results demonstrate that the proposed controller could achieve the good robust contouring over both conventional PD controller and ISMC. In terms of accuracy, it is indicated that the accuracy in the task for contouring with the proposed controller will not be affected by the operation, which is under uncertainty and various conditions, for example, the task that requires the different speeds for the various operation in working place.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported in part by the Ministry of Science and Technology, Taiwan, ROC, under grants MOST 104-2218-E-194-008, MOST 104-2622-E-194-003-CC2, and MOST 104-2622-E-194-010-CC2.
