Sliding Modes for a Manipulator Arm of 4 Degrees of Freedom

The first step in designing a controller for a manipulating arm is to determine its configuration, which means, analyzing the main components that make up the mechanism. A manipulating arm is composed of joints, motors, sensors and other elements, which are linked to conform the different degrees of freedom (generalized coordinates: prismatic, rotational or a combination of both, which is presented as the most unusual), which allow the calculation of the dynamic model implemented to obtain the control specifications [1]. In this paper, the calculation of a controller by sliding modes for a manipulator arm with 4 rotational degrees of freedom will be done, showing the respective results and conclusions at the end. Keywords—Arm Manipulator, Articulated Pair, Degrees of freedom, Dynamic Model, Generalized Coordinates, Sliding Modes Controller Nomenclature Degrees of freedom DOF Derivative of error ! Double derivative of error ! Electrical Motor Constant !! Error e Generalize Coordinates ! Generalize Coordinates of Acceleration ! Generalize Coordinates of Speed ! Gravitational Forces Vector ! ! Inertial matrices ! ! Vector of centrifugal and Coriolis forces ! !! ! Vector Friction Forces ! !


Introduction
The physical composition of a manipulating arm is similar to the anatomy of a human arm, so that, on certain occasions, the elements which constitute it are referenced using terms such as hip, shoulder, elbow, and wrist. A manipulator is defined as a set of rigid bodies interconnected by prismatic or rotational junctions which generate relative movements of the elements that constitute it, producing displacements in the final link of the kinematic chain [1]. These mechanisms are implemented for risky applications that have an may have a negative impact on human health, so the importance of designing control algorithms for their functioning is evidenced [2].
For the design of the controller, it is necessary to obtain the kinematic and dynamic models that define the behavior of the mechanism´s movement. The kinematic model describes the Cartesian space of the articulated trajectories located at the end of the open kinematic chain and is defined as the study base of the dynamics in which the actual forces in that system are considered [3,4 ]. Therefore, a dynamic model is calculated to analyze the necessary forces to cause movement. In other words, the torque required to manipulate the position and velocity variables in the hybrid platform [5].
This work is organized as follows: Section 1 describes the physical characteristics of the mechanism to be implemented, as well as the model that defines the required torque by each of the joints, in addition to the required speed behavior for the motor´s movement. In section 2, the results of the controller development by the sliding mode method are presented. Section 3 presents the conclusions of the study.

2
Manipulator Structure Figure 1 shows the configuration of the manipulator to be implemented, where a 4 DOF arm is described. It should be noted that the center of mass for the links is located in the middle of each one of them.

Inverse Dynamics of manipulators
After specifying the manipulating arm's configuration, the lagrange formulation of equation (1) is implemented, which determines the dynamic model for the calculation of the torque to be controlled in each one of the links, taking into account its mass, length, inertia, viscous friction and gravitational force [6].
For ease of implementation, the dynamic model must be expressed as shown in equation (2), in order to obtain a more adequate configuration when calculating and simulating the controller to be designed.

Motor Specifications
To obtain the necessary variables for the controller design, speed and torque specifications given by the Dynamixel Pro M54-60-S250-R motors in Figure 2, which will be located in each of the mechanism´s DOF, must be considered. From there, it is obtained that the motor´s top speed is 28.8 RPM, so that in figure 3, the system's most efficient torque is determined and thus, the control variable's saturation is defined.

Sliding Mode Controller
The sliding modes controller´s principle consists in designing a sliding surface, responsible for forcing the system´s variables so that their behavior resembles such surface. Then, the dynamic system´s control law is determined by the sliding surface equation in (8) and its derivative in (9) [7]. It is necessary to take into account that ! ! ! ! ! !"!!! !" . The same concept will be considered for the generalized coordinates After defining the sliding surface, it is important to ensure the existence of the sliding surface itself. For this, it is taken into account that the states of the system slide on the surface without being affected by parametric variations or external perturbations [8].
To obtain the control law, equation (1), which determines the dynamics of the manipulator, is retaken up with its control variable ! as shown in (10).

Controller Parameters
For the calculation of the controller, we propose as ! ! simulation constants, those arranged in equation (25) and ! ! , those arranged in equation (26); obtained from the definition of a second order Ruth polynomy with a damping coefficient ! = 0.9 and a sampling time of 0.15, 0.17, 0.13, and 0.05 for the four joints, respectively. The sampling time variation is defined to eliminate the error generated by the sum of the accumulated inertial effects in each of the joints of the kinematic chain. 3

Analysis of Results and Discussion
To verify the controller's operation, random paths that ensure that the mechanism passes through its center of rotation are presented. In figures 4 through 7, the behaviors generated by the sliding modes controller are obtained. In them, the blue signal shows the desired behavior and the violet signal shows the obtained behavior.
Then, the speed behavior generated by the controller in Figures (8) to (11) is obtained with the same signals as those used for the position behavior.

Error analysis
After obtaining the behavior in position and speed, the calculation of errors generated in each of the joints is dona. The errors produced by the sliding modes controller are described in Figure (12) and (13). A numerical analysis is made, using the mean square error formulation, since it incorporates the estimation variance, as shown in table 1.
Then, the power required by the controller to cause the previously defined movements is calculated. In figure (14), the required power by each joint is observed, while in figure (15) its energy is obtained.
Finally, Table 2 shows the numerical values for the maximum power required by each joint

Conclusions
The previously obtained results indicate that the sliding mode controller shows tolerated behavior for precision applications, since the errors are not minimal with values of 0.8591 for articulation 1, 0.3462 for articulation 2, 0.1768 for articulation 3 and 0 for articulation 4. The above shows that the best trajectories are obtained when the control law is applied directly on the dynamic model of the system, that is, on the inertia, cetrifugal force, coriolis and friction matrix arrays.
For speed, we obtain errors of 19.0019 for articulation 1, 7.5928 for articulation 2, 3.8629 for articulation 3, and 0 for articulation 4, with a minimum of power required as observed in Table 2.