Nonlinear model identification and statistical verification using experimental data with a case study of the UR5 manipulator joint parameters

Abstract The identification of nonlinear terms existing in the dynamic model of real-world mechanical systems such as robotic manipulators is a challenging modeling problem. The main aim of this research is not only to identify the unknown parameters of the nonlinear terms but also to verify their existence in the model. Generally, if the structure of the model is provided, the parameters of the nonlinear terms can be identified using different numerical approaches or evolutionary algorithms. However, finding a non-zero coefficient does not guarantee the existence of the nonlinear term or vice versa. Therefore, in this study, a meticulous investigation and statistical verification are carried out to ensure the reliability of the identification process. First, the simulation data are generated using the white-box model of a direct current motor that includes some of the nonlinear terms. Second, the particle swarm optimization (PSO) algorithm is applied to identify the unknown parameters of the model among many possible configurations. Then, to evaluate the results of the algorithm, statistical hypothesis and confidence interval tests are implemented. Finally, the reliability of the PSO algorithm is investigated using experimental data acquired from the UR5 manipulator. To compare the results of the PSO algorithm, the nonlinear least squares errors (NLSE) estimation algorithm is applied to identify the unknown parameters of the nonlinear models. The result shows that the PSO algorithm has higher identification accuracy than the NLSE estimation algorithm, and the model with identified parameters using the PSO algorithm accurately calculates the output torques of the joints of the manipulator.


Introduction
Modeling real-world mechanical components is a challenging problem in engineering applications [1].
Obtaining an accurate mathematical model of the systems is crucial to better understand the systems' dynamic behavior [2]. Moreover, the mathematical model plays an important role in various research areas such as filter design, monitoring, design optimization, fault detection, and sensor-less control [3][4][5]. Over the past few decades, many studies have been performed to develop and implement various algorithms to model real-world systems such as robotic manipulators. However, the identification of unknown parameters of the nonlinear terms that exist in the dynamics of these components is the key and most difficult point of the modeling techniques, and they are seldom solved simply and effectively. The main types of modeling methods that are commonly used in engineering applications can be categorized into black-box and white-box modeling methods [6].
In black-box models, the model structure and its parameters are adjusted without considering the physical insight of the system. Generally, these models are based on neural networks, deep neural the PSO algorithm is applied to identify the unknown parameters of nonlinear models of a direct current (DC) motor [27,28]. It is demonstrated that the PSO algorithm successfully identifies the model parameters with different nonlinear friction terms. Yan et al. employed the PSO algorithm along with a Proportional Integral Derivative controller to identify the dynamic parameters of a 2-DOF robotic manipulator [29]. They successfully identified the robots' dynamic parameters, such as the mass of the links and lengths of the links. In ref. [30], it is shown that the PSO algorithm can accurately identify the unknown coefficients of the model over a wide working region. Moreover, the PSO algorithm needs fewer parameters to tune and converges to the optimum solution with fewer iterations. Since the PSO algorithm performs a parallel search to converge to the optimal solution, it could be used efficiently to solve complicated nonlinear model problems in engineering fields. In this study, due to the stated advantages, the PSO algorithm is selected to identify the unknown parameters of the nonlinear terms that exist in the real models of the mechanical components.
Generally, if the structure of the model with nonlinear terms is provided, the unknown parameters of these terms can be identified using any conventional approach or evolutionary algorithm. However, finding a non-zero coefficient does not guarantee the existence of the nonlinear term or vice versa. Therefore, a thorough investigation and statistical verification are required to ensure the reliability of the identification process. According to the literature, there is not a general method to validate the value of identified parameters using different approaches. However, the hypothesis and confidence interval tests are well-known techniques that are commonly used in statistics science to test the reliability of the regression coefficients [31,32]. Meanwhile, they have received less attention in the nonlinear modeling of real-world mechanical components to validate the accuracy of the identified parameters. Therefore, employing hypothesis and confidence interval tests to validate the accuracy of the identified parameters of the nonlinear models using the PSO algorithm is one of the main contributions of this study.
This research aims to properly identify the unknown parameters of nonlinear models of real-world mechanical components such as robotic manipulators and validate the results using statistical testing.
Obtaining an explicit mathematical model for nonlinear dynamic systems is a very difficult process. In this study, the existence of some nonlinear phenomena such as nonlinear friction terms has been determined, and their unknown parameters have been identified. The parameter identification part could be performed with various methods, but the existence of nonlinear terms in the mathematical model of the system has to be verified with statistical methods. For this purpose, the identification algorithm is combined with the statistical hypothesis and confidence interval tests to evaluate the reliability of the identification algorithm. In this study, the PSO algorithm is used to identify the unknown parameters in its simplest form so that any interested reader may implement the proposed strategy. To realize the nonlinear model's parameters identification algorithm, the following steps are performed: first, some possible nonlinear terms that exist in mechanical components such as robotic manipulators, including the static, viscous, and Coulomb frictions, and the Stribeck velocity effect, are collected from the literature. The simulation data for two different scenarios, including different combinations of nonlinear terms, were initially generated using the nonlinear white-box models of a DC motor as a benchmark problem. In the first case, all nonlinear terms are included in the real model of the DC motor. In the second case, some of the possible nonlinear terms are excluded from the real model of the DC motor to check the reliability of the PSO algorithm in the identification of the right terms in the model. Then, the PSO algorithm is applied to identify unknown parameters in the models. To evaluate the accuracy of the results, the statistical hypothesis and confidence interval tests are implemented. Finally, the reliability of the algorithm is evaluated using experimental data acquired from the 6-DOF UR5 robotic manipulator. The complete dynamic model of the manipulator is developed, and unknown parameters of the nonlinear terms are identified using the PSO algorithm. To compare the accuracy of the identified parameters of the model using the PSO algorithm, the NLSE estimation algorithm is applied to identify the unknown parameters of the nonlinear models and the results are discussed. The nonlinear white-box model development, the PSO identification algorithm, and all the statistical validation tests are implemented in MATLAB software.
The remainder of the paper is categorized as follows. The literature review on modeling methods and the methodology utilized in this paper is given in Section 2. The nonlinear models for the case studies that are utilized to verify the suggested methodology are presented in Section 3. The results of the research are discussed in Section 4. Finally, concluding remarks are provided in Section 5.

Nonlinear modeling
Various mathematical models have been suggested in the literature to identify nonlinear phenomena that are physically seen in mechanical components such as robotic manipulators. The nonlinear hysteresis behavior of the mechanical systems is addressed and modeled in refs. [33,34]. Static friction and the effect of temperature and pressure on its coefficient are investigated in ref. [35]. Static friction models cannot capture the friction effect in the pre-sliding phase or when the system operates at extremely low velocities. To compensate for these inadequacies, dynamic friction models including Coulomb friction terms have been developed in refs. [36,37]. The Stribeck velocity effect, which makes friction very nonlinear, is proposed in ref. [38] and is included in certain nonlinear friction models [39,40]. The nonlinear behavior of viscous friction on lubricated surfaces was investigated in ref. [41]. In this study, two nonlinear terms, including an exponential shape and a third-order polynomial, are added to the LuGre model in order to capture the nonlinearities in the gross sliding regime. The general equation for nonlinear friction torque (T f ), which includes all of the nonlinearities mentioned in the literature, is written as Eq. (1).
where T c represents the Coulomb friction that occurs when non-lubricated surfaces are in contact. The static friction which describes the steady-state behavior between angular velocity and friction torques is approximated with T s . The nonlinear Stribeck velocity is represented with ω s . The viscous friction that captures the linear relationship, exponential shape, and nonlinearity effect is represented by the last three terms of the equation. The angular velocity (rad/s) is shown with ω.
After developing a general equation of possible nonlinear terms of real-world mechanical components, the PSO algorithm is adopted to identify the unknown parameters β = [T s , T c , T v1 , T v2 , T v3 , ω s ] of the nonlinear models.

Parameter identification through PSO algorithm
In this research, the PSO algorithm is adopted to identify the parameters of the nonlinear terms of Eq. (1). Although the PSO algorithm has been implemented in different engineering applications, it is scarcely utilized for the identification of the parameters of the physically meaningful nonlinear terms of the systems' model. The PSO is an iterative evolutionary algorithm inspired by the animal colony behavior that was first introduced in ref. [42]. In the algorithm, each particle keeps track of its previous best position while accelerating toward the best solution of its position and the population's best position [43]. At each iteration, the particle compares the fitness value of its current location to that of the population. If the particle's current location has a higher fitness value, the best value in the population is replaced with the particle's current location. After several iterations, the algorithm converges to the location where the best solution, called the "global best," is found. The updated velocity of each particle (V z+1 i ) is calculated using the particle's current velocity (V z i ) and the particle's distance from the global best (gBest) and personal best (pBest) as Eq. (2).
where d 1 and d 2 are acceleration coefficients and are tuned as 2. The best position of the particle in the population and the best position of the particle in its search history are shown with gBest and pBest, respectively. The distance of the global best and the personal best from the particle's current position is multiplied by random values (rnd 1 and rnd 2 ) between 0 and 1. χ is the inertia weight and could be expressed as Eq. (3): The tuning coefficients χ min and χ max are chosen to be 0.4 and 0.9, respectively, which are ideal values according to ref. [44]. The other parameters of the PSO algorithm are determined by trial and error as follows: 10 particles are assigned to each of the unknown parameters of the mathematical models, and the maximum iteration is set to 1000.
Using the updated velocity of the particle (V z+1 i ) and the current position of the particle (X z i ), the updated position of the particle (X z+1 i ) could be calculated with Eq. (4): Since the equation of the possible nonlinearities was introduced in Eq.
(1), model parameters could be identified using the output signal of the real model and the model with identified parameters of the mechanical components. The cost function (J) of the algorithm is constructed as a root mean squared error between the real outputs Y j and the calculated outputs (Ŷ j ) values using the model with identified parameters for n data samples as Eq. (5). The best-fitted model should be determined in such a way that the cost function value (J) is minimized.
Furthermore, the NLSE estimation algorithm, which is an extended form of the linear least square errors estimation method, is applied to evaluate the performance of the PSO algorithm in the identification of the exact parameters of the nonlinear model of the mechanical components [45]. The algorithm estimates the parameters of the nonlinear model using the linear least square errors estimation method, and the results are attentively refined using the Levenberg-Marquardt algorithm [46].

Statistical test
Since the identified parameters using the PSO algorithm are utilized in real models of the systems, the results should be verified with statistical tests. For this aim, the hypothesis test is implemented to determine the significance of the identified model parameters (β k ). In the first step, the two hypotheses including null hypothesis H 0 and alternative hypothesis H 1 are considered as represented in Eq. (6) [47,48]: In the statistical hypothesis test, a null hypothesis and an alternative hypothesis are formulated such that if the null H 0 is rejected, then the alternative is accepted [49]. The hypotheses test begins with the null hypothesis that each of the parameters of the nonlinear model is equal to zero and is excluded from the nonlinear model.
Then, the standard deviation of the model parameters (SD βk ) is calculated using Eq. (7).
where (σ 2 βk ) is the variances of the model parameters which are extracted from the diagonal elements of the variance-covariance matrix.
In the next step, the standard error of the model parameters (SE β k ) is calculated via dividing the standard deviation of the parameters to the square root of the data samples (n) and is represented as Eq. (8).
Then, the test statistic value (Z k ) is calculated using Eq. (9): where β 0 is the value assigned to the parameters in the null hypothesis (H 0 ). Then, the corresponding probability value (p − value) k of the calculated test statistic value (Z k ) from the distribution under the null hypothesis ( (Z k )) is calculated using Eq. (10).
The (p − value) k checks the validity of the null hypothesis that the parameter k of the model is equal to zero or not. In other words, the significance of the parameter β k is evaluated using the probability value (p − value) k . If the (p − value) k is equal to or less than the specified significance level (α), the null hypothesis is rejected and the alternative hypothesis is accepted at that level. In this case, it could be concluded that the alternative hypothesis is true, which means that the parameter β k of the nonlinear model is not equal to zero and the corresponding term exists in the model. Conversely, if the (p − value) k is greater than the specified α value, it could be concluded that the parameter β k of the nonlinear model is equal to zero and the corresponding term does not exist in the model. In this research, the significance level (α) is assumed to be 0.01, which corresponds to the confidence interval level of 99%. The procedure of the hypotheses test is shown in Fig. 1.
For further analysis of the results of the PSO algorithm, the lower bound confidence intervals (LBCI k ) and upper bound confidence intervals (UBCI k ) values of the identified parameters β k are calculated as Eq. (11). The identified parameter β k that includes 0 value in its confidence interval [LBCI k UBCI k ] has no significant effect on the model and its corresponding term could be ignored from the model and vice versa [48].
The procedure of the confidence interval test is shown in Fig. 2.
In the next section, two different nonlinear modeling benchmark problems are presented.

Case studies
In this section, two case studies, including nonlinear models of a DC motor and the UR5 robotic manipulator, are represented, which include nonlinear terms in the systems. The first case study is intentionally modeled using simulation data for validation, whereas the second one utilizes experimental data from the robotic arm.

Case study 1: DC motor
In the first case study, an actual model of a DC motor that contains all or some of the possible nonlinear terms is used to generate the simulation data for nonlinear modeling through the PSO algorithm. The DC motor is an electro-mechanical element that converts electrical energy into mechanical energy [50]. Due to its durability, portability, and high efficiency, it is one of the most preferred actuating components in many industrial applications such as robotics and automatic systems. A schematic diagram of a DC motor including electrical and mechanical circuits is represented in Fig. 3.
Developing an accurate mathematical model representing the actual dynamic behavior of the DC motor is necessary for controller design, performance evaluation, and so on. The mathematical model of the DC motor includes both electrical and mechanical terms. The electrical circuit of the motor could be represented as Eq. (12) using Kirchhoff's second law: where U(t) is the input voltage, i(t) is the current flowing in the circuit, and R and L are the resistance and inductance of the motor coil. E(t) represents the back electro-motive force and could be written as Eq. (13): where ω(t) is the angular velocity and K represents the motor constant. The mechanical circuit of the DC motor is developed using Newton's second law as Eq. (14): where T m (t) is the motor torque, and J is the total moment of inertia of the motor.
In DC motor modeling, the general approach is to ignore the nonlinear terms and develop linear models using Eqs. (13) and (14). However, when the motor rotates in two directions or works at low velocities, nonlinear phenomena such as Coulomb friction and viscous friction affect the performance of the system. Neglecting the effect of these nonlinear phenomena in the mathematical model of the system leads to modeling errors. To develop a more accurate model of the DC motor, the possible nonlinear terms in Eq. (1) should be added to the linear model. However, to test the reliability of the PSO algorithm in the identification of the correct terms of the model, two possible situations are considered.
In the first situation, all nonlinear terms in Eq. (1) are included in the simulation model and the PSO algorithm is utilized to identify model parameters. Consequently, the motor torque Eq. (14) is re-written as Eq. (15): The PSO algorithm will be utilized to identify the unknown parameters (J, K, L, R, , ω (1) s ) of the nonlinear model using the simulation data of the DC motor model. However, in the second situation, to evaluate the reliability of the PSO algorithm in the identification of the correct nonlinear terms, the nonlinear terms of the viscous friction are eliminated from the model represented in Eq. (1). Consequently, the last two nonlinear terms of the model including T v2 sign(ω(t))ω 2 (t) and T v3 ω 3 (t) are discarded from the simulation model as represented in Eq. (16).

Case study 2: A UR5 manipulator
In the second case study, experimental data are used to verify the reliability of the PSO algorithm in the identification of the nonlinear model parameters. For this purpose, experiments are performed to acquire data from the UR5 robotic manipulator through the appropriate identification and test signals. The UR5 robotic arm is a 6-DOF manipulator that is comprised of six revolute joints, which are categorized into two sets of joints. The first set comprises the first three joints (base, shoulder, and elbow) with bigger motors, whereas the second one includes the last three joints with smaller motors (wrist-1, wrist-2, and wrist-3) [51]. Each joint of the robot includes its own brushless alternating current motor along with a strain wave gearing mechanism. The main structure of the UR5 manipulator and its experimental setup are represented in Fig. 4(a) and (b). The dynamic model of a robot explains its motion in terms of the torques and forces applied to the robot's joints. The explicit knowledge of this model is very useful as it may be used for many purposes, such as model-based control and sensor-less force estimation. For industrial robots, the torques (τ ) applied to the robot joints could be calculated using the Euler-Lagrangian method using Eq. (17) by taking the joint coordinates as the generalized coordinates [52].
where M(q) is the (6×6) mass inertial matrix, C(q,q) is the (6×6) Coriolis and centrifugal matrix, and g(q) is the (6×1) gravity force matrix. q,q, andq represent the position, velocity, and acceleration of the joints of the robotic manipulator. The matrices that appear in this equation, however, are different for each robot. Consequently, the dynamic analysis of an industrial robot concerns itself with finding those values for a given robot of some known parameters. In this study, the dynamic model of a UR5 manipulator is computed analytically. In the first step of this analysis, the kinematics of the robot are solved at the position and velocity levels using the Denavit-Hartenberg parameters. In addition to the task space coordinates of the tip-point, the rotation matrices that describe the orientation of each link and the tip-point Jacobian are computed. In the second step, the Jacobian matrices for the individual center of mass locations of the links are computed. This information in conjunction with the mass and center of mass values is used to compute the values for the elements of the matrices (M(q), C(q,q) and g(q)) that appear in Eq. (17). The kinematic information of the UR5 manipulator, which is provided by the manufacturer, is listed in Tables I and II. The inertia tensors of the links (i = 1:6) including the moment of inertia values are calculated and provided as Eq. (18).
Since different possible configurations of the nonlinear friction terms expressed in Eq. (19) may occur while the robot is operating, the identification of the exact type of friction that exists in the model of the joint has great importance. A precise dynamic model of the manipulators generally relies on the identification of accurate parameters for these nonlinear terms. For this purpose, the PSO algorithm is applied to identify the unknown parameters of the nonlinear terms of the UR5 dynamic model. To realize the identification procedure, the appropriate identification and validation trajectories are generated. Then, while the UR5 manipulator follows the trajectory, experimental data from the encoder position and the motor current sensor are collected.

Results and discussion
In this section, the nonlinear model's parameter identification using the PSO algorithm and statistical tests of the results are provided for both case studies.

Case study 1
Two possible scenarios are considered to check the reliability of the PSO algorithm in the identification of the correct nonlinear terms of the DC motor dynamic model. In the first scenario, the real nonlinear model of the DC motor, which contains all possible nonlinear terms (Eq. 15), is employed to generate simulation data. Two input signals which cover different working regions of the DC motor are used for parameter identification and model validation purposes. To obtain the exact dynamic behavior of the DC motor, the input signal should have the capacity to excite all the dynamics of the system. For this aim, an extended random signal in the range of [-5 5] V is applied as an identification signal and is represented in Fig. 5.  The PSO algorithm is applied to identify the parameters of the nonlinear model, and statistical tests are performed to check the accuracy of the results. The white Gaussian noise with the signal to noise ratio of 28 dbW is added to the output angular velocity ω(t) of the actual nonlinear model of the DC motor. The output of the actual nonlinear model of the DC motor and the calculated output angular velocity using the model with identified parameters are shown in Fig. 6.
The real parameters of the DC motor and the identified parameters using PSO and NLSE estimation algorithms, identification errors along with the LBCI, UBCI, and p-values of the parameters are shown in Table III.
Both actual parameters and identified parameters of the DC motor are given in Table III. For further analysis of the results, p-values of the parameters are calculated. The p-values of all the parameters are calculated as 0, which is less than the significance level value (α) (p-value < 0.01). It could be concluded that all of these parameters are significant and should be included in the model of the DC motor. Moreover, the values of the LBCI and UBCI of the parameters of the model are calculated. Since none of the identified parameters includes a 0 value in their confidence region, it could be concluded that all the parameters are statistically significant and exist in the real model. Consequently, due to the statistical results, the PSO algorithm successfully identifies the unknown parameters of the model when all the nonlinear terms exist in the actual model of the DC motor. Furthermore, since the identification error of the parameters is less than 5%, it could be concluded that the PSO algorithm is capable of identifying the unknown parameters of the nonlinear model.  The coefficient of determination (R 2 ) is calculated to evaluate the relative measure of fitness between actual and calculated output using the model with identified parameters through the PSO algorithm as Eq. (20) [53].
whereŶ j , Y j , and Y j represent the calculated, actual outputs, and the mean of the output, respectively. The R 2 value for the first scenario is calculated as 97.1%, which means that the model with identified parameters using the PSO algorithm could perfectly explain the variations in the output angular velocity data around its mean. Furthermore, the mean square errors (MSE) is calculated to check the accuracy of the model with identified parameters in calculating the outputs. The MSE value is calculated as small as 0.01 (rad/s), which means that the model with identified parameters using the PSO algorithm could accurately calculate the output of the DC motor.  In the second scenario, to evaluate the reliability of the PSO algorithm in the identification of the correct nonlinear terms, some of the possible nonlinear terms are excluded from the real model of the motor. For this aim, the nonlinear terms of the viscous friction are eliminated from the nonlinear model represented in Eq. (1) and simulation data are generated using the model shown in Eq. (16). The same input voltage signal used for the prior scenario, which is represented in Fig. 5, is applied as an identification signal to the model. Then, the PSO algorithm is applied to identify the parameters of the nonlinear model, and statistical tests are performed to check the accuracy of the results. The white Gaussian noise with the signal to noise ratio of 28 dbW is added to the output angular velocity ω(t) of the actual nonlinear model of the DC motor. The output of the actual nonlinear model of the DC motor and the calculated output angular velocity using the model with identified parameters are shown in Fig. 9.
The real parameters of the DC motor and the identified parameters using PSO algorithms, along with the identification error and parameters' LBCI, UBCI, and p-values, are shown in Table IV.
Both actual parameters and identified parameters of the DC motor are given in Table IV. For further analysis of the identification results, p-values of the parameters are calculated. Except for T(2) v 2 and T(2) v 3, the p-values of other identified parameters such as J, K, L, R, T (2) s , T (2) c , T (2) v1 , and ω (2) s are calculated as 0, which is less than the significance level α value (p-value < 0.01). It means that these parameters are statistically significant and should be included in the model of the DC motor. The p-values of T (2) v2  and T (2) v3 , on the other hand, are calculated as 1, which is greater than the significance level value (pvalue > 0.01). It means that these parameters are statistically insignificant and could be discarded from the model. Moreover, for further analysis of the reliability of the identified parameters, the values of the LBCI and UBCI of the model parameters are calculated. The T (2) v2 and T (2) v3 parameters include 0 values in their confidence region, which means that these parameters are statistically insignificant and do not exist in the real model. Consequently, according to the results of the statistical tests, the PSO algorithm could identify the unknown parameters of the model even when some of the nonlinear terms are not included in the actual model of the DC motor. Furthermore, since the identification error of the parameters is less than 5%, it could be concluded that the PSO algorithm is capable of identifying the unknown parameters of the nonlinear model.
In the next step, the identified parameters are replaced in the DC motor model. The same input voltage signal used for the prior scenario, which is represented in Fig. 7, is applied as a verification signal to the model. The white Gaussian noise with the signal to noise ratio of 25 dbW is added to the output angular velocity ω(t) of the actual nonlinear model of the DC motor. The output signal of the actual nonlinear model of the DC motor and the calculated output angular velocity using the model with identified parameters are represented in Fig. 10.
To evaluate the output of the model with identified parameters in the second scenario, R 2 and MSE values are calculated and discussed. The R 2 value is calculated as 97.5%, which means that the model with identified parameters explains the variations in the output angular velocity data around its mean.  The MSE value is calculated as small as 0.01 (rad/s) which indicates that the model with identified parameters using the PSO algorithm could accurately calculate the output angular velocity of the DC motor.

Case study 2
For identifying the parameters of the nonlinear model of the joints of the UR5 manipulator, two trajectories are generated for identification and validation purposes. The connection with the UR5 manipulator is established via the Universal Robot-Robot Operating System driver, provided by the ROS industrial project. The joint trajectories of random frequency content are generated in MATLAB at waypoints sampled at 100 Hz. These waypoints are then sent to the robot via the Joint Trajectory Action client. As the robot executes the trajectories, joint variables, including the positions and velocities of all the joints, as well as their currents, are published by the ROS driver. To compute the acceleration of the joints, feed-forward and feed-backward numerical differentiation of the measured velocity signal is performed. For each joint of the robot, the measured current of the motor is multiplied by the joint's gear ratio and   [51]. Since all terms of the joint models of the UR5 manipulator depend on the velocity profiles of the joints, the trajectories for identification and validation are chosen such that they cover different motor velocities. Two different trajectories are utilized to identify the unknown parameters of the model and verify the models with identified parameters using PSO and  In the next step, the nonlinear model of the manipulator is developed and the PSO algorithm is applied to identify the unknown parameters of the dynamic model. The parameter identification process with the PSO algorithm is considered as an optimization problem that searches for the best values in the parameter space. The cost function of the algorithm is to minimize the error between the measured and calculated torque for a given trajectory. Each particle of the algorithm contains 6 parameters, and the total number of particles is set to 60 (10 particles for each parameter). To evaluate the performance of the PSO algorithm, the NLSE estimation algorithm is performed using the optimization toolbox of MATLAB and the unknown parameters of the nonlinear model are identified using this method. To evaluate the results of both algorithms, statistical hypothesis tests, including null hypothesis and confidence interval tests, are performed. The identified parameters of the model using the PSO and the NLSE estimation  Table V. According to Table V, the identified parameters, including τ c i , τ s i , τ v1 i , andq s i for all joints of the robot (i = 1-6), are identified as non-zero values using the PSO algorithm, which means that their corresponding nonlinear terms exist in the dynamic model of the joints. However, τ v2 i and τ v3 i (i = 1-6) values for all joints of the UR5 manipulator are identified as approximately equal to 0 using the PSO algorithm. It means that the corresponding nonlinear terms of these parameters could be discarded from the dynamic model of the joints. However, according to the results of the NLSE algorithm, all the parameters of the dynamic model of the joints, except τ v2 5 and τ v3 5 , are identified as non-zero values. It means that the corresponding nonlinear terms of the identified non-zero parameters exist in the dynamic model of the joints while the other two parameters (τ v2 5 , τ v3 5 ) do not exist or have less impact in the model. Statistical tests of the parameters are conducted for further analysis of the reliability of the identified parameters using both algorithms. According to the confidence interval tests, only the parameters including τ v2 i and τ v3 i of all joints contain zero values in their confidence interval [LBCI UBCI]. It could be concluded that these parameters are statistically insignificant and do not exist in the model. Meanwhile, the remaining parameters, including τ c i , τ s i , τ v1 i , andq s i , should be included in the dynamic model of the joints since their confidence intervals do not contain a 0 value. The null hypothesis test results could be interpreted as follows: The p-values of the identified parameters, including τ c i , τ s i , τ v1 i , andq s i are all calculated as approximately equal to 0, which is less than the significance level α (p-value < 0.01). It could be concluded that these parameters are statistically significant and exist in the dynamic model of the joints. Conversely, the p-value of the remaining parameters, including τ v2 i and τ v3 i , is calculated approximately equal to 1, which is greater than the significance level α (p-value > 0.01). It indicates that these parameters are statistically insignificant and do not exist in the dynamic model of the joints. Consequently, concerning the statistical tests, the identified parameters using the PSO algorithm are more accurate than those identified using the NLSE algorithm.
With the exception of the viscous friction nonlinear terms τ v2 i and τ v3 i , the physical interpretation of the results shows that all nonlinear terms mentioned in Eq. (1) exist in the real nonlinear model of all the joints (i = 1-6) of the UR5 manipulator. To interpret the accuracy of the model with identified parameters using both PSO and NLSE algorithms, the applied torques of the joints are calculated and are shown in Fig. 13.
To validate the model with identified parameters using both algorithms, a new trajectory is generated and supplied to the UR5 manipulator. The validation signal, including position, velocity, and accelerations of all the joints of the manipulator, and the representation of the verification trajectory in Cartesian space are demonstrated in Figs. 14 and 15.
Finally, the models with identified parameters using both algorithms are utilized to calculate the output torque of the joints of the UR5 manipulator using a validation signal. The measured applied torques of the joints and the calculated torque of the joints of the models with identified parameters using both PSO and NLSE algorithms are shown in Fig. 16.
To evaluate the performance of the model with identified parameters using the PSO and NLSE algorithms, the joints of the robot are divided into two sets, where the first three joints (base, shoulder, elbow) are assigned to set 1 and the other three (wrist-1, wrist-2, wrist-3) are assigned to set 2. The absolute values of the joints' torque errors are calculated and represented in Fig. 17.
The higher errors of the NLSE algorithm are related to the accuracy of the identified parameters, which may be obtained as local optima values. The R 2 and MSE values are calculated to compare the output of the model with identified parameters using the PSO and NLSE algorithms for each set of the joints of the UR5 manipulator and are listed in Table VI. According to Table VI, the R 2 values of output torques of all joints of the models with identified parameters using the PSO algorithm are greater than the ones calculated for the models with identified parameters using the NLSE algorithm. Furthermore, the average R 2 value for first set of the joint of the models with identified parameters using the PSO and the NLSE algorithms is calculated as 97.27% and 89.91%, and for the second set of the joints it was calculated as 89.68% and 85.81%. It means that the models with identified parameters using the PSO algorithm for all the joints could explain the variations in the output angular velocity data around their mean much better than the models identified using the NLSE algorithm. Furthermore, the corresponding MSE values of the model outputs using the PSO algorithm for all joints of the UR5 manipulator are less than the ones calculated for model outputs using the NLSE algorithm. Furthermore, the average MSE value for the model outputs of the first set of the joints using the PSO and NLSE algorithms is calculated as 3.64 (N.m) and 15.3 (N.m), and for the second set of the joints, it is calculated as 0.53 (N.m) and 0.71 (N.m), respectively. It could be concluded that the models with identified parameters using the PSO algorithm more accurately calculate the actual torques of the joints when compared to the output of the models with identified parameters using the NLSE algorithm.

Conclusion
In this study, the existence of nonlinear friction terms in mechanical components such as robotic manipulators has been determined, and their unknown parameters have been identified. For this purpose, the white-box models of real-world mechanical components that include nonlinear terms were developed, and then the PSO algorithm was applied to identify the parameters of the existing nonlinear terms of the model among possible configurations. However, the main aim of this research was not only to identify unknown parameters but also to verify the existence of nonlinear terms in mechanical components such as robotic manipulators. Therefore, meticulous investigation and statistical verification were carried out for a reliable identification process using both simulations and experimental data. Moreover, to evaluate the performance of the PSO algorithm, the NLSE algorithm is applied to identify the unknown parameters of the nonlinear model. The framework of identification used here could be summarized as follows: first, the PSO algorithm was adopted to identify the unknown parameters of the nonlinear model of the DC motor using simulation data for two different scenarios, including different combinations of the nonlinear friction terms. Then, the reliability of the PSO algorithm in the identification of the correct terms of the nonlinear model was evaluated by applying the statistical hypothesis and confidence interval tests. The statistical tests proved that the PSO algorithm could successfully identify the accurate model parameters of the DC motor using simulation data, and the maximum identification error was as small as 5%. To evaluate the reliability of the PSO algorithm in the identification of the exact nonlinear terms, experimental data were acquired from all joints of the UR5 manipulator. The statistical test results demonstrated that the PSO algorithm can successfully identify the significant parameters of the nonlinear model of real-world mechanical components such as the UR5 robotic manipulator. To evaluate the performance of the PSO algorithm, the NLSE algorithm is also performed using the optimization toolbox of MATLAB and the unknown parameters of the nonlinear model of the UR5 manipulator are identified. According to the statistical tests, the identified parameters using the PSO algorithm are more accurate than those identified using the NLSE algorithm. In order to determine which models with identified parameters give more accurate results, the R 2 and MSE values for the model outputs are calculated. It was demonstrated that the R2 values of the output torques of all joints calculated using the PSO algorithm are greater than those calculated using the NLSE algorithm. It means that the models with identified parameters using the PSO algorithm could explain the variations in the output angular velocity data around its mean much better than the models with identified parameters using the NLSE algorithm. The corresponding MSE values of the model outputs using the PSO algorithm for all joints of the UR5 manipulator are calculated to be lower than those for model outputs using the NLSE algorithm. It could be concluded that the PSO algorithm not only identifies the accurate parameters of the nonlinear model of the UR5 manipulator, but the models with identified parameters using the PSO algorithm could calculate the actual torques of the joints more accurately than the ones calculated using the models with identified parameters using the NLSE algorithm.
For further development of the algorithm, additional physically interpretable nonlinear terms such as flexibility, hysteresis, dead-zone, and saturation that exist in real-world mechanical components would be collected from the literature and included in the nonlinear mathematical model. The identification framework used here can be applied to different real-world nonlinear systems, such as thermal or fluid systems, mechanical or electrical systems, such as solenoid actuators. Hence, this study might lead to new directions for both academic research and engineering applications. Moreover, other methods such as the Monte Carlo Markov chain combined with the Bayesian principle will be utilized to estimate the unknown parameters of the models to compare the results obtained in this research.
Financial support. This research received no specific grant from any funding agency, commercial, or any sector.

Conflicts of interest.
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this study.