Dynamic Model and Inverse Kinematic Identification of a 3-DOF Manipulator Using RLSPSO

This paper presents the identification of the inverse kinematics of a cylindrical manipulator using identification techniques of Least Squares (LS), Recursive Least Square (RLS), and a dynamic parameter identification algorithm based on Particle Swarm Optimization (PSO) with search space defined by RLS (RLSPSO). A helical trajectory in the cartesian space is used as input. The dynamic model is found through the Lagrange equation and the motion equations, which are used to calculate the torque values of each joint. The torques are calculated from the values of the inverse kinematics, identified by each algorithm and from the manipulator joint speeds and accelerations. The results obtained for the trajectories, speeds, accelerations, and torques of each joint are compared for each algorithm. The computational costs as well as the Multi-Correlation Coefficient (R2) are computed. The results demonstrated that the identification accuracy of RLSPSO is better than that of LS and PSO. This paper brings an improvement in RLS because it is a method with high complexity, so the proposed method (hybrid) aims to improve the computational cost and the results of the classic RLS.


Introduction
The diffusion of several systems in industrial environments has led over the years to the fact that several identification methods were developed to monitor and control various models of plants such as mobile robots or manipulator robots giving them the ability to operate accurately and efficiency [1]. These robots must perform tasks with great perfection and safety. For this purpose, they need appropriate kinematic and dynamic models that represent the real manipulator.
Nonlinearity and time variation are characteristics of some systems and to model and control them one often wants to use linear models. One of the difficulties of some processes is when operating conditions change thus giving a valuable choice of model partitions during the upgrade. Some methodologies of estimation of model parameters were proposed as the recursive least squares method (RLS). According to the work presented in [2] the RLS method updates a vector of parameters and has a lower computational cost than the non-recursive least squares method. The work of Hafezi et al. [3] addresses two recursive identification methods with ARMA noise with applications in identification of bilinear systems were proposed the generalized extended least squares (GELS) and recursive maximum likelihood (RML) methods.
The quality of data obtained by the system can significantly influence the identification of a manipulator model. Generally some data may have poor quality thus interfering the identification process. Its include insufficient input excitation and low signal to noise ratio. Moreover, brief knowledge of the system model can help in the implementation of the control project. Physical systems may include nonlinear and stochastic behaviors and present data outliers. These systems can interferes in the performance of identification algorithms. The Robust Algorithms Approach has relevance when it comes to systems with outliers according to [4]. The appearance of outliers may also compromise the performance of techniques when there is insertion of Gaussian distribution noise in the data samples as presented in [5].
In [6], the LS is used to solve the problem of four degrees of freedom ship manoeuvring. It is used to perform identification modelling with the full-scale trial data. A new transformed multi-innovation least squares (TMILS) algorithm it was used. Ma, J. et al. in [7] proposes a new approach for identifying a Wiener-based model in which the system can be interpreted by an exogenous autoregressive model coupled with least squares and a support vector machine (LSSVM). The parameters were select by adaptive particle swarm optimization (APSO) that obtain better performance in relation of classical PSO.
The work of [8] presents an identification of dynamic parameters of the lower extremity exoskeleton using the Particle Swarm Optimization (PSO) metaheuristic in the search space defined by Recursive Least Square (RLS), thus making it a hybrid method. During the definition in the PSO search space, the hybrid method not only avoids the convergence of parental identification to the local minimum, but also has very accurate results. Particle Swarm Optimization (PSO)-based identification methods with some variations have been shown in [9]. The identification method is applied to a robotic manipulator where the estimated gaps are used to predict joint torques.
The prototype of a 5-DOF hybrid manipulator was developed in research conducted by [10]. In this research the mechanical structure, the kinematics, the dynamics and the control system were presented. In the results the kinematics and dynamics simulations of this manipulator are presented and tests of accuracy and repeatability of the manipulator path and position. In paper [11] to solve the problem of inverse kinematics (IK), reinforcement learning (RL) was used, designed to balance the lower body of a humanoid 3D robot that has 12 degrees of freedom (DOF). The lower body trajectories are learned by RL which are IK solutions that are converted into positions for NAO robot joints. This reduces the learning dimension because RL-integrated IK eliminates the need to use whole humanoid robot (HR) states. The purpose of the work presented in [12] was to create an ABB IRB120 industrial robot representation for simulating and analyzing dynamics and kinematics of the industrial robots by using MapleSim. In addition the paper presents how linear and nonlinear models of the robot can be obtained and makes available them to public.
Dynamic modeling and kinematics analysis of parallel robot was presented in [13]. In research of [14] its refer to inverse kinematics and a new method to identify the parameters of the dynamic model of the manipulator that was the identification of dynamic parameters based on Particle Swarm Optimization (PSO). The dynamic model taking into account the friction of the manipulator joints is determined and the dynamic parameters are defined as a linear form of the identified parameter. PSO is used to minimize the optimum manipulator trajectory parameters.
In [15] used the torque exerted by each joint when performing periodic excited Fourier trajectories. The parameters were divided into a linear and nonlinear part and used the least square linear parameter estimation (LLS) and the double swarm-based particle swarm optimization (DPso) to calculate the linear and nonlinear parts, respectively. The configurations used were simpler and can identify the dynamic parameters, the friction coefficients of the joints. Already in the paper of [16] techniques were used to identify the dynamic parameters in an industrial manipulator robot with 5 degrees of freedom. The parameters were identified using LS, Adaline artificial neural networks, Hopfield artificial neural networks and the extended Kalman Filter. To solve manipulator robots identification problems [17] presented an intelligent approach with PSO that was called the elitist learning strategy (ELS) and the proportional-integral-derivative controller (PID) hybridized approach (ELPIDSO). The parameter identification of robots manipulator was performed to evaluate the performance of the approach. The ELPIDSO was superior to the LS method, genetic algorithm (GA) and SPSO in the estimation of the parameters of the robot manipulators kinetic models.
Based on the review done above this paper aims to identify the inverse kinematics of a cylindrical manipulator using LS, RLS, and RLS with PSO (RLSPSO). The positions of each manipulator joint obtained using the inverse kinematics model calculated from a trajectory in the Cartesian space are used as input data. The model of the manipulator dynamics is calculated using Lagrangean mechanics and the equations of torques of each manipulator joint are presented. The results show the trajectories, speeds, accelerations, and torques of each joint, real and estimated. The computational cost of each algorithm used in the identification as well as the Multi-Correlation Coefficient (R 2 ) of each manipulator joint is presented. A discussion of the results is carried out and the advantages and disadvantages of each method are presented. The inverse kinematics identification can be used to generate real-time manipulator trajectories and to generate collision-free trajectories in static and dynamic obstacle environments as well as being used as an approximation of the inverse kinematics model.

Contributions
This paper improves the results of classic RLS in relation to computational cost of the proposed method. It is used a particle swarm algorithm with an objective function resulting from the RLS covariance matrix. Each method will be presented a quantitative analysis of the results in order to verify the issue of reducing the complexity of calculating the covariance matrices of the algorithms.
The system to be identified is a three phase induction motor driven cylindrical robotic manipulator. The importance of the proposal is due to the issue of different points of operations when the manipulator is driven. The proposed method still works with non-Gassian disturbances in the system inputs, testing its robustness. This paper is organized as follows. Section 2 presents the characteristics of the manipulator. Section 3 presents the models of direct kinematics and inverse kinematics, the Jacobian model and the dynamic model. Section 4 presents the formulations on how the LS, RLS, and RLSPSO algorithms were used. Section 5 presents the results of the implemented algorithms and the discussions about the work. Finally Section 6 presents the discussions and conclusions are mentioned in Section 7.

Cylindrical Manipulator
This section presents the characteristics of the manipulator used in this research, as well as the kinematic and dynamic modelling. The kinematics will be modelled using Denavit-Hartenberg (DH) notation, and the dynamic model is based using the Lagrangean Mechanics (LM) modelling method formulations. A cylindrical robotic manipulator that is driven by three phase induction motors was used in this work. As can be seen in Figure 1 the first joint moves around the main axis of the structure (rotational motion), the second and third joints have linear (prismatic) movements, which defines as a RPP (Rotational-Prismatic-Prismatic).
The three-phase induction motors used are of the squirrel cage type. The power of the motors was chosen so that it was possible to move each joint of the manipulator.

Characteristics of the Manipulator
This subsection presents some physical characteristics of the manipulator under study. To calculate the torques of each joint it was necessary to find the masses of the robot and the simplest form was through a modelling software Solid Edge c that was able to provide this information [18]. In Figure 2 presents the computational modelling of the manipulator.  Through the software of computer modelling were found the main physical properties of the manipulator as the dimensions, masses and moments of inertia of each joint. Figure 3 shows a modelling software screen with the physical properties of the manipulator only for joint 2.
The values of the masses (m) and lengths (l) of each link of the manipulator are shown in Table 1. The information presented in Table 1 will be used for calculating the joints torques 1, 2 and 3.

Kinematic and Dynamic Modelling of the Robotic Manipulator
The kinematics exposes the relative motion of the reference systems, as the structure moves by relating reference systems to the various portions of the structure [19,20].

Forward Kinematics
The cylindrical manipulator used in this paper is shown in Figure 4 (Kinematic model of an RPP robotic arm). The kinematic configuration of the manipulator according to the Denavit-Hartenberg (D-H) convention in [21] is established and presented in Table 2. The DH parameters are: twist angles α i , link lengths a i , joint displacements q i , and link offsets d i , where i = 1, . . . , n. Obviously, the manipulator has a revolute degree-of-freedom (DOF), and two prismatic movements, it an RPP robotic manipulator. Using the DH conversion to the parameters shown in Table 2 are the corresponding matrices A and T [22] given by: Any final position (end-effector) of the manipulator can be found in the Cartesian space from the coordinates in the joint space, as noted in Equation (5):

Inverse Kinematics
Inverse kinematics defines the configuration, the values of the joint variables, that the manipulator must have for the position and orientation of a chosen point. One method to solve the problem of inverse kinematics of a manipulator is by the geometric method [22]. Applying this method it can be found that θ 1 is defined by: The parameter of link 2 is prismatic, as can be seen in Figure 1, and d 2 is in the same axis z 1 given by: In the case of the third parameter d 3 , it will move in the plane formed by x and y and can be determined by: Equations (6)-(8) are the solutions for the cylindrical manipulator inverse kinematics problem and will be used to perform position control and manipulator path and trajectory generation.

Jacobian
The relationship between the Cartesian (end-effector) and joint speeds of a manipulator is given by the Jacobian [22]. As can be seen in Figure 4 a cylindrical manipulator has the following variables of the joints, q = (θ 1 , d 2 , d 3 ).
Since the manipulator has a revolute joint and two prismatic joints, i.e., three joints, the Jacobian matrix in this case is of dimensions 6 × 3 and is of the form: where we have z o = [0 0 1] T = z 1 and o 0 = [0 0 0] T ; z 2 an o 3 are given by: Substituting each matrix and performing the necessary operations, considering d 3 = l 3 + 0.35, we have the Jacobian matrix 6 × 3, given by: This reveals that it is impossible to perform a rotation around the x 0 and y 0 axes. The Jacobian in relation to the linear speed of the end-effector can be obtained considering only the first three matrix lines that is

Dynamic Modelling
The dynamics of the manipulator displays the between the position-speed-acceleration-torque relationship of the joints. Therefore, the dynamic modelling of an industrial robot aims to know the relationship between the movement of the robot and the forces applied to it [19,23]. The model of the manipulator dynamics can be obtained using the Euler-Lagrange formulation, [24,25]. The model equation is of the form shown below: where L is the Lagrangian; K is the kinetic energy and P is the potential energy (see Appendix A.1). For the cylindrical manipulator under study was calculated the kinetic and potential energy and then applied the formulation based on the Lagrangian [23]. From the Jacobian Equation (12) one can determine the speeds and the equations of the kinetic energy, after performing some operations and mathematical transformations. Potential energy equations could be obtained from classical mechanics [23]. From the Lagrange Equation (14) the system motion equations given by: where τ ∈ n , are the torques applied to the joints. Thus, considering the kinetic energy of the manipulator the dynamic equation of the manipulator can be written in simplified form as: where, q,q,q ∈ n indicate the positions, speeds and accelerations joint's, respectively; M(q) is the inertial matrix; C ∈ n is the matrix that describes the centripetal and Coriolis forces and G ∂g ∂q ∈ n is the gravity matrix.
Applying the Lagrange formulation Equation (14) and from the equation of motion Equation (15), performing the calculations of the partial derivatives, it can be obtained the torque equations of each joint of the manipulator [22] which are shown below. The first equation of motion describing the torque of joint 1 is: Likewise by solving the partial derivatives for the second joint of the manipulator we have the torque of the joint 2 found from the equation of motion of the joint 2: Following the same idea the partial derivatives for the third joint of the manipulator, the equation of motion describing the torque of joint 3 is given by: The terms in the torque equations,θ 1 ,d 2 ,d 3 are related to the angular accelerations of the links, the termsθ 2 1 ,ḋ 2 2 ,ḋ 2 3 are the centripetal accelerations, and the termsθ 1ḋ2 ,θ 1ḋ3 ,ḋ 2ḋ3 are the Coriolis accelerations [23].
Equations (17)- (19) were used to calculate the torques of each manipulator joint and the torque values are presented in the following results section.

Identification Methods
The practice of identification algorithms is interesting for many applications such as supervision, diagnostics, filtering, prediction, signal processing, detection, and variant parameter tracking for adaptive control. In this section, we presente the methods of identification of the inverse kinematics using Least Squares (LS), Recursive Least Squares (RLS), and Recursive Least Squares with Particle Swarm Optimization (RLSPSO) according to the literature [26][27][28].

Least Squares (LS)
The LS method is one of the most well-known and is used in the most diverse areas [29]. Consider the rigid-body dynamics Equation (16). Let us excite it with a control input τ and collect the resulting q,q, andq. Assume we have collected θ samples of each element of τ, q,q andq corresponding to time instants t 1 , t 2 , . . . , t k , [30]: where and n is the total number of sampled data points. The columns of the matrix Φ should be linearly independent for LS to accurately approximate the parameters. The estimation process can be improved using the total proximity of least squares which also considers uncertainties in the regression matrix. The input τ(t) it is appropriate to stimulate robot dynamics. With this stimulus the vector of identifiable parameters θ can be estimated from the least-squares (LS) sense using some generalized inverse of the information matrix Φ,θ = Φ * y, where "*" denotes a generalized matrix inverse. Equation (21) is a solution by the LS method, which is equal to the solution obtained using the pseudo-inverse matrix. This solution will be used to perform the inverse of kinematic identification with LS.

Recursive Least Squares (RLS)
The LS method is based on set of measures and is unsuitable for real-time application. It is necessary to build, update, have available a model of the system during on-line operation [26,28].
A dynamic model taken over a set of data generates constraints that can be presented by a matrix equation which can be written in the regressor form as, where φ is called the matrix of regressors and ξ is the residue. The RLS solution for θ [k] takes the following form [31]: where and

Recursive Least Squares with Particle Swarm Optimization (RLSPSO)
Particle Swarm Optimization (PSO) is a metaheuristic inspired on social behavior proposed by [32]. The main objective of the algorithm is to search in a given space, through the data permutation of the particles, consequently each particle will be a trajectory in the search space. PSO excels at other algorithms in aspects such as easy implementation and fast convergence. As with other search algorithms, PSO may have particles trapped in local minima locations [33].
The PSO metaheuristic has particles similar to a set of birds that seek the best way to fly taking into account the position and speed of each particle. A convergence curve is used during the execution of the algorithm. Each particle will have its resulting goal depending also on the behaviour of the general population of particles [33]. The position at time t is updated by x i (t) and at future time t + 1 will be given in (26).
where v i (t) is the speed [34]. Each particle will present a cognitive component which will be a relation of the distance between itself and the best (optimal solution) besides the social component that is the understanding of the set on the existence of a given particle. For this problem, we used the global PSO (Global best PSO) in which the particle speed is updated by: for v ij (t) being the speed of the particle, in a given dimension at time t. Again, c 1 and c 2 are the acceleration parameters. The best particle information is given byŷ ij and y ij is the best position from the beginning [34].
Unlike other evolutionary computing techniques in PSO each particle is associated with a speed. Particles fly through the search space with speeds that are dynamically adjusted according to their historical behavior. Finally, the particles have a tendency to traverse the best areas for research to a solution during the search process [34].
For the PSO algorithm (see Algorithm 1) the following values of the elements were used: : end if 10: for j = 1 to n 11: r 1 = rand(), r 2 = rand(); : end for 16: to satisfy the stopping criterion 17: Optimal value of P convariance matrix The stopping criterion used in the PSO algorithm was the number of iterations of the algorithm. The PSO metaheuristic has as its mission to minimize the objective function given in Equation (28), with the number of iterations equal to 10, and the algorithm was executed 10 times for obtaining the best result.
where R 2 J i is the multiple correlation coefficient applied to joints 1, 2 and 3.

Results
In this section, we present the results of the identification of the inverse kinematics of the manipulator. Comparisons of actual and estimated values are presented. The results of speeds, accelerations and torques are also presented for each trajectory generated from the identification of LS, RLS, and RLSPSO.
To perform the manipulator trajectory, an algorithm describing a trajectory shown in Figure 5 was developed where the displacement of each manipulator joint in the cartesian space is performed. This trajectory provides the final manipulator positions collected from the encoders of each manipulator joint that were used as inputs to the algorithms that perform inverse kinematic identification. In this study, we will consider both noise-free case and noised case in the measurements of position, speed, acceleration. Measurement noises are all considered as the white noise with standard deviation σ = 0.05 and the signal to noise ratio is 10 dB.
It is noteworthy that the initial states of the estimation of each algorithm for each joint were initialized with values equal to zero.

Noise-Free results
The present results are data without noise, to make a final analysis. The results of the LS, RLS, and RLSPSO methods will be discussed in this section.

Results of LS
The following are the figures with trajectories, speeds, accelerations and torques of joints 1, 2, and 3 of the manipulator. The trajectories in the space of the joints were obtained from the resolution of the inverse kinematics and the identification using LS using as input the points of the trajectory in the Cartesian space shown in Figure 5. Figure 6 shows the trajectories (displacement) of the joint 1, 2, and 3 to perform the path in Cartesian space shown in Figure 5. Figure 7 shows the results of errors in identification the trajectories of each joint using the least squares method. Figures 8 and 9 shows the speeds and accelerations of joints 1, 2, and 3 to perform the trajectories shown in Figure 6, respectively.
The joint torques were obtained from the dynamic model, Equations (17)- (19) of the manipulator and are shown in Figure 10. Torques were calculated by taking the trajectories, speeds and accelerations shown in Figures 6, 8 and 9.

Results of RLS
The following are the paths, speeds, accelerations and torques of joints 1, 2, and 3 of the manipulator. The trajectories in the space of the joints were obtained from the resolution of the inverse kinematics, and the identification using RLS. For this case, we used an exhaustive search to find the best P [k] weights in order to get better results. The matrix result is:  Figure 11 show the trajectories (displacement) of the seals 1, 2, and 3 to perform the path in Cartesian space shown in Figure 5. Figure 12 shows the results of errors in identification the trajectories of each joint using the recursive least square method. Figures 13 and 14 shows the speeds and accelerations of joints 1, 2, and 3 to perform the trajectories shown in Figure 11.
The joint torques were obtained from the dynamic model shown in Equations (17)- (19) of the manipulator presented in Figure 15. Torques were calculated by taking the trajectories, speeds, and accelerations shown in Figures 11, 13, and 14, respectively.

Results of RLSPSO
The following are the paths, speeds, accelerations and torques of joints 1, 2, and 3 of the manipulator. The trajectories in the space of the joints were obtained from the resolution of the inverse kinematics and the identification using RLSPSO. The PSO was used to perform an optimization to find the weights of the matrix P [k] of the RLS. The matrix P [k] found by the PSO was  Figure 16 shows the iterations and the cost in which can be observed that PSO algorithm converges to six iterations with the best cost.
The stopping criterion of the algorithm is number of iterations. Figure 17 show the trajectories (displacement) of the seals 1, 2, and 3 to perform the path in Cartesian space shown in Figure 5. Figure 18 shows the results of errors with trajectories identifications using the recursive least square with PSO method.

Results with Noise
Non-Gaussian noise data were used to verify the method identifications with the input data, as well as the appearance of outlies making the estimates difficult.

LS with Noise
The recursive least squares method obtained a high computational effort trying to find the best solution with noisy inputs. Figure 22 show the trajectories (displacement) of the seals 1, 2 and 3 to perform the path in Cartesian space. The speeds and accelerations.  Figure 23 shows the results of errors in identification the trajectories of each joint using the least square with method with noise.  Figures 24 and 25 shows the the speeds and accelerations of joints 1, 2, and 3 to perform the trajectories shown in Figure 22.

RLS with Noise
The use of noise in the RLS obtained a higher computational effort than no noise where the covariance matrix found was:   Figure 28 shows the results of errors with trajectories identifications using the recursive least square with method with noise.  Figures 29 and 30 shows the the speeds and accelerations of joints 1, 2, and 3 to perform the trajectories shown in Figure 27. The Figure 31 shows the results with torque noises using the recursive least square method.

RLSPSO with Noise
This section will present the results of the RLSPSO with noise. The matrix P [k] found by the PSO for RLS with noise was: In Figure 32 shows the iterations and the cost where it can be observed that the PSO algorithm converges to 45 iterations with the best cost. The stopping criterion of the algorithm is number of iterations.    Figures 35 and 36 shows the the speeds and accelerations of joints 1, 2, and 3 to perform the trajectories shown in Figure 33.  The torques obtained with the noisy inputs can be seen in Figure 37.

Comparison of Algorithms
A quantitative analysis of the each algorithm in the identification of the paths of each joint is given in Table 3 by the performance indexes: Multiple Correlation Coefficient, (R 2 ) and Computational Cost of each algorithms. Equation (29) presents R 2 given by, where y i are the observed data,ȳ is mean of the observed data, andŷ data estimated by the model. Can be observed from Table 3, the R 2 values of each joint are assumed values varies from 0 to 1, the closer to 1 means that the estimate is good.  Table 4 shows the results of the R 2 and computational cost of algorithms with noises. From Table 3 can be observed that the index R 2 of the algorithm RLSPSO has a better result than the LS and RLS as well as a lower computational cost compared to the conventional RLS but was higher than that of the LS. For this application the proposed algorithm presented a better performance than the conventional RLS algorithm. The RLSPSO algorithm in this work is presented as a form of improvement of conventional RLS. Noise input methods achieved satisfactory results when compared to noisy methods. Table 5 presents the complexity of the LS, RLS, and RLSPSO algorithms in terms of number of sums, multiplication, and divisions. It can be assumed that regressor vector has length M. Table 5. Complexity of Algorithms per input Sample.

Discussion
Regarding the convergence of the RLSPSO algorithm: noise-free in the sixth iteration the algorithm converges for the best result and noise also begins to converge in the sixth iteration and fully converges in the forty-fifth iteration. Compared to classic RLS obtained an improvement in computational cost and overall result.
The main difficulty in the classical method is in weighting of covariance matrix that is empirically initialized. The metaheuristic pondered this matrix in a search space optimally so the covariance matrix was found faster and more efficiently than empirically or exhaustively searching. However this fact took into account the robustness of the RLSPSO algorithm because even being injected noise in the inputs managed to converge quickly and obtaining satisfactory results. The non-linearity of the system and the changes of operating points made identification difficult it is worth noting that the proposal may be valid as an alternative for nonlinear and variant systems.
Inadequate choice of covariance matrix may compromise method identification, so PSO was able to obtain a covariance matrix that could be robust enough to perform well even with data noise.
The speed and acceleration of a manipulator while performing a manipulation task depend on: grip stability, working environment, material shape, weight, material and stiffness of the object to be manipulated, type of grip or tool used. A cylindrical manipulator can be designed for high rigidity and load capacity and is suitable for transferring oversized materials, handling some parts or handling simple tools, not suitable for other tasks such as welding, assembling, grinding and usually work at low speeds [22,23]. For material handling tasks, the end-effector consists of a jaw of appropriate shape and size, determined by the object to be grasped. For machining and assembly tasks, the end-effector is a specialized tool or device, for example, a welding torch, a spray gun, a mill, a drill bit or a screwdriver [23].
For this paper, the data were collected at low speed because it is intended to use the manipulator for the displacement of high mass loads and lower speeds will be necessary because the material of the tool may slip, which also depends on the type of grip used, high speeds may occur as the material comes loose causing accidents. Another task that is intended to be used with the manipulator under study is the inspection where a camera will be used in place of the end-effector, to perform product quality inspection. The speeds we want to apply are in the range 0.1 to 1 m/s (linear speeds) and 5 to 50 deg/s (angular speeds) [23] for manipulation tasks. For inspection tasks the speed of the camera (which will be mounted on the end-effector) will be in the range of 0.10 to 0.30 m/s [35].

More Method Results
More results of the identification of each method are presented here, where a more detailed comparison was made for a better visualization. Figures 38-41

Conclusions
This work presents an alternative algorithm for calculating the inverse kinematics of robot manipulators based in RLS with PSO identification methods. Other methods were used, assessed and compared, namely LS and RLS. The results shown to be consistent and satisfactory in the identification of the inverse kinematics of the manipulator. Noises have also been added to the data to make estimates more difficult and to check their robustness when working with outlies. To show the efficiency of the algorithms, the R 2 of each algorithm, for each joint was calculated. The RLSPSO algorithm presented a better result than the conventional RLS both in R 2 and in computational cost. This algorithm is a form of improvement on the conventional RLS. This research also presented the kinematic and dynamic modelling of the manipulator. The dynamic model is important for the control of the manipulator. Also research is being performed on trajectory planning in a collision-free environment.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A. Dynamic Model of the Cylindrical Manipulator
The Lagrangian formulation based on the mechanical system is defined as L(q,q) = K(q,q) − P(q) (A1) For the cylindrical manipulator under study the kinetic and potential energy was calculated and then the Lagrangian based formulation was applied.

Appendix A.3. Lagrange Equation
The equations of motion of the system are given by where τ ∈ n are the torques (forces) applied to the joints. Thus, considering the kinetic energy of the manipulator, the dynamic equation of the manipulator can be written in simplified form as M(q)q + C(q,q)q + G(q) = τ (A15) where C ∈ n is the matrix that describes the centripetal and Coriolis forces, and G = ∂g ∂q ∈ n is the gravity vector.
The effects of joint friction and external forces on the end-effector can be included in the dynamic model of the manipulator M(q)q + C(q,q)q + F(q)q + G(q) = τ − f ext On what f ext is the external force applied at the end-effector and F(q) ∈ ×n represents the effects of dynamic and static friction forces on the joints. This vector also represents disturbances and dynamics not modeled as gaps in couplings and mechanical transmissions.