1. Introduction
Manipulator robots can be described as automated electromechanical systems with flexible functionalities (i.e., programming according to the environmental conditions in which they operate). The main role of the manipulator robot is to help the human operators in fulfilling repetitive tasks with increased risk in an industrial environment. From the perspective of robot control, focus is put on the structure and functionality of the robot command unit. Based on the dynamic and geometrical model and the tasks that need to be performed, appropriate commands are established. In order to provide these commands to the actuators, the hardware and the software, it is required to use the feedback signals obtained from the sensory system unit [
1]. Due to the complexity of the manipulator robot, the control architecture has a hierarchical structure. The upper level makes the decision with respect to the actions that need to be taken (e.g., simple test based on “if-then” actions), while the lower level carries out the control of the joints. The typical structure of the control system consists of a computer on the upper level and a system with one or more microcontrollers to drive the actuators of the joints on the lower level.
Mechatronic systems, in special robots, are very popular for control applications due to their interdisciplinary nature [
2,
3,
4]. For linear mechatronic systems, the proportional-integral-derivative (PID) controller has been widely used given its simple structure and robustness [
5]. Usually, the design of conventional integer-order PID controllers is based on the model of the system.
The manipulator robots are also used in medicine for precision surgery [
6,
7,
8]. Surgery has become an extremely precise practice, and professionals often have to make movements in the order of hundreds of microns. The inherent limits of human dexterity are a constraint for new advances in this field. In this context, high-precision robotics are being developed and implemented for medical use [
9,
10]. From the observation of these devices, it is possible to acquire an idea of their versatility. Not only in medicine, but in the high-tech industry, as well, robotic automation is highly competitive and requires very high precision and better performance. Therefore, the performance specifications of control have also become extremely demanding.
In these real applications of the UR10 robot, the characteristics of the system may be subject to changes (e.g., the mass attached to the end effector, the speed of the joints (TCP respectively), the required precision, etc.). The controller, however, has to keep its performance constantly optimal. Usually, the robots already have an internal control loop, making the robot stable and performing quite well. Nevertheless, this controller cannot fulfill all the user specifications and does not perform optimally in all situations. Therefore, a new controller is employed in order to overcome the user requirements [
11,
12,
13,
14]. Hitherto, PID control is widely used in control engineering and industry. The most challenging step in employing PID controllers, for non-experts in control engineering, is the process of parameter tuning. Nowadays, the self-tuning PID digital controller provides much convenience in engineering [
15,
16]. Optimal control of a plant (in this particular application, the robot arm) is highly dependent on the plant behavior.
Throughout the years, several methods have been introduced [
17,
18,
19] to improve the tuning principles proposed by Ziegler and Nichols. Astrom and Hagglund proposed an AMIGO (approximate M-constrained integral gain optimization) tuning rule for PI controllers [
20], based on the ideas presented in [
21], where the tuning of the controllers is done so as to maximize the integral gain subject to constraints on the maximum sensitivity. The same approach was later extended to PID controllers [
22] and finally perfected by adding additional constraints [
23] to make the tuning method suitable for a wide class of processes. Skogestad proposed a novel tuning rule based on the ideas behind IMC (internal model control) that have achieved widespread industrial acceptance [
24]. These novel tuning rules, referred to as SIMC (Skogestad IMC), work well for both integrating and pure time delay processes, for both setpoint changes and load disturbances and are suitable for first-order or second-order time delay models.
In this paper, we propose simple and efficient calibration of the robot controller based on an auto-tuning procedure. The auto-tuning method attempts to design PID controllers that ensure a minimum phase margin PM = 45° and a minimum gain margin GM = 2. The method is based on defining a forbidden region in the Nyquist plane, using the performance specifications, and then searches for the optimal PID controller that ensures that the difference between the slope of the region border and the loop frequency response slope is minimum. This requirement leads to PID controllers that are robust to gain, as well as to phase and delay variations. Although the method has already been compared to various other popular PID tuning methods [
25], its main features have not been fully revealed. To design the PID controller, a single sine test is applied to the robot to determine its frequency response and its frequency response slope [
26], needed in the auto-tuning procedure. The original elements of this paper include, apart from a detailed description of the auto-tuning method, also the particularities of using it in a closed loop setting. Moreover, for the first time, the auto-tuning method is validated experimentally.
This paper is structured as follows: The next section gives a description of the robotic system used in this study.
Section 3 discusses the automatic calibration of the robot using an auto-tuning approach.
Section 4 presents the implementation and the corresponding results of the tuning procedure. The conclusion is formed in
Section 5.
2. System Description
A robot manipulator, depicted in
Figure 1, can be defined as a kinematic chain consisting of multiple rigid bodies, which are interconnected by joints. Every joint of the kinematic chain consists of one degree of freedom, which can be translational or rotational. In the work of Spong et al. [
1], it is mentioned that a simple representation of a robot manipulator joint can be modeled as a spring with linear constant stiffness. Based on the Lagrangian formulation, the dynamics of a global manipulator robot with
n revolute joints are given by [
27]:
where
represent the joint variables (the generalized joint coordinates, the velocity and the acceleration),
is the inertia matrix,
is the
vector of the Coriolis and centrifugal forces,
is the friction torque,
is the gravity force and
Q is a vector representing the actuator forces associated with the joint coordinates
q. The matrix
is the transpose of the Jacobian matrix of the robot, while
is the joint force vector applied at the robot end-effector.
The matrices and G are composed of complex functions, which describe the kinematic link dynamics through a set of parameters (), , also known as Denavit–Hartenberg parameters.
The considered UR10 robot studied in this paper has the following Denavit–Hartenberg (D-H) parameters; see
Table 1.
The highest variation in the robot dynamics is introduced by the gravity matrix and the inertia matrix. The gravity term is present even when the robot is stationary or moving slowly. The torque exerted on a joint due to gravity acting on the robot is strongly dependent on the position and orientation of the robot.
Due to the construction of the robot (three large joints and three small joints), we expect to have a larger variation introduced by the shoulder joint and elbow joint. For example, the gravity torque acting on the elbow joint is higher when the robot is in a position such that the elbow joint has to support the shoulder-lift joint and the wrist joint. To illustrate this aspect, we have investigated the variation of the gravity load for Joint 2 (shoulder-lift joint) and Joint 3 (elbow joint) with respect to the robot configuration. The obtained results are illustrated in
Figure 2. As observed, Joint 2 has a larger variation (
Nm) compared to Joint 3 (
Nm). This analysis is important for robot design, as well as for control design in order to ensure a feasible control input for the motors.
The gravity matrix is not the only term that varies with respect to the position of the robot. The other matrix that is highly dependent on the robot pose is the inertia matrix. By inspecting the elements of this matrix, we observe that it is symmetric with diagonal terms
describing the inertia related to joint
j. The other elements
of the inertia matrix represent the coupling between joint
j and joint
i. In
Figure 3, we can see the variation of the Joint 1 inertia with respect to the pose of the robot (here, Joint 2 and Joint 3 are varying between −180 and +180).
In most of the robotics applications, one needs to control the pose of the end-effector, which can be done through the direct kinematics formulation. In this research study, a six-degree of freedom manipulator robot is considered; thus, the direct kinematic equation is given as:
where
represent the homogeneous transformation matrices. The direct kinematics can be calculated via the Denavit–Hartenberg (D-H) formulation [
28].
Starting from the assumption that the pose, the velocity and the acceleration are known and based on Equation (
1), it is possible to calculate the required joint torques.
Given the pose configuration of the end-effector, the joint variables corresponding to this configuration can be calculated using the inverse kinematics formulation. The inverse kinematics is a very challenging problem since it is almost impossible to obtain a unique solution. In the literature, there are two approaches used to calculate the inverse kinematics: the analytical method and the numerical method [
28]. Here, a numerical method was considered [
27]. The existence of solutions is guaranteed only if the given end-effector position and orientation belong to the manipulator’s dexterous workspace.
Nowadays, a large number of the industrial robots are driven by brushless servo motors. A schematic overview of a classical robot joint is illustrated in
Figure 4.
Several studies in the area of the control of manipulator robots consider as control variables the Cartesian coordinates. However, in order to obtain the desired Cartesian trajectory for the end-effector attached to the robot, each joint axis must follow a specific trajectory. The common approach to control the robot joints is based on the decentralized techniques, which consider an independent controller for each joint. The industrial robot considered for our experiments is electrically actuated. If the robot joint drivetrain is driven by the current:
then the torque generated by the motor is proportional to the current:
where
is the transconductance of the amplifier,
is the motor torque constant and
u is the applied control voltage. Based on this assumption, the dynamics of a motor attached to a joint
j can be defined as:
with
Coulomb’s law of friction,
B the viscous friction and
the total inertia seen by the motor for joint
j, computed as:
Since in real life, disturbance torques such as gravity and friction can act on the joints, the common approach where independent control systems are considered to control the robot joints is no longer efficient. The control performance decreases, leading to high overshoot and large steady-state error. A classical approach to overcome these shortcomings is to use a nested control structure composed of two loops: one outer loop and one inner loop, as depicted in
Figure 5. The outer loop is used to control the position and to provide the velocity of the joints in order to minimize the position error, while the inner loop is used to minimize the error between the actual velocity of the joint and the velocity demanded by the outer loop.
For simplification purposes, if the Coulomb friction from Equation (
5) is ignored, the equivalent Laplace transform of (
5) is given by:
where
and
are the Laplace transform of their corresponding signal from time domain
and
u. Thus, the transfer function of a motor drivetrain attached to a robot joint can be written as:
Typically, a PI controller is used to drive the robot joint from the actual velocity to its demanded velocity. However, in this experiment, it is no need for good closed loop dynamics; therefore, a P controller has been selected (note that the P controller was used only for tests in order determine the process frequency response and process frequency response slope) for simplicity in the computations in the next section, and thus, we have:
4. Experimental Results
This section reports the experimental results that were achieved in order to validate the auto-tuning method of a PID controller, presented in the previous section. The performance of the obtained controllers has been evaluated in the real-time application using the setup depicted in
Figure 15. In order to communicate with the UR10 robot, the Robotics System Toolbox of MATLAB® and the ROS platform were used.
The UR10 controller uses Ethernet and the TCP/IP protocol to send and receive commands. The control and calculations of the robot are executed in MATLAB®. Although it is possible to send commands directly from MATLAB® to the controller, it was chosen to use the ROS platform for a more versatile solution. Therefore, the ROS-supported
ur_moder_driver runs on a computer with a Linux operating system, which is directly connected to the robot controller through TCP/IP. The
ur_modern_driver allows an easy communication with many different operating systems and publishes robot data with the use of ROS messages. As MATLAB® has a built-in ROS support, this ensures a very clear and effortless communication; for more details, please see [
32]. An overview of the complete communication model is given in
Figure 16. The running nodes and topics within the ROS platform related to this case study are illustrated in
Figure 17.
The procedure used to control the movements of the robot is presented in the flowchart in
Figure 18. Notice that the auto-tuning method implies the use of
and
velocity_based_controller, as well. Besides controlling the movements of the robot, it is very important to have access to the status of the robot’s joint states (joint position, joint velocity, joint effort, etc.). Thus, it can be mentioned that implementing a new controller on an industrial robot is strongly dependent on the opening level of the robot controller and the type of the driver used. In order to implement the auto-tuning method presented in this paper it is required to have read/write access to the joint states of the robot.
The speed control was developed and applied to Joint 2 and Joint 3 of the manipulator robot (these two joints have a larger variation compared with other joints). The controller was tested for multiple scenarios and different configurations of the manipulated robot. The first test was conducted using the following configuration
, and the obtained results are presented in
Figure 19a and
Figure 20a. The output of the manipulator robot for the second configuration (
) considered in this paper is presented in
Figure 19b and
Figure 20b. The third test case presented in this paper is illustrated in
Figure 21 and
Figure 22. As observed, the controller performs equally for different joint configurations, while keeping the interaction between joints at a minimum. It can be seen that the PID controller designed using the proposed auto-tuning procedure converges to the imposed reference for all considered cases and presents no overshoot in comparison with the available controller. Given the problem addressed in this paper, the results provided indicate that the auto-tuning method can be successfully applied in the field of robotic control.