Abstract
Introduction
In recent time, programming robot arms for maximizing their capabilities remains a challenging task [1]. Fine tuning of control parameters is particularly a time consuming and an expensive procedure [2, 3]. Indeed, control parameters must take account of coupling effects between multiple-joints. Furthermore, tuning procedure becomes a very complex problem when the robotic arm must operate in a constrained environment with high-accuracy performance and high speed. In fact, in such case, there is an increasing requirement for stable position/force control strategies [4, 5, 6]. Furthermore, not only position and speed parameters of the controllers must be tuned but also force controller parameters.
In many cases, using Artificial intelligence (AI) techniques is a good alternative to improve controller performances for robotic arms [7]. A wide range of AI techniques as neural network [8] and fuzzy logic [9] have been widely applied to proper tuning controller parameters of robot manipulators. Successful applications can be found in [10, 11, 12].
Alternatively, a wide range of new (AI) techniques, have submerged [13]. These novel techniques are biological-inspired optimization methods. They iteratively use random elements to transfer one candidate solution into a new better solution with regard to a given fitness function.
The main nature-inspired optimization approaches are Genetic Algorithms (GA), Simulated Annealing (SA), Tabu Search, Ant Colony Optimization (ACO) and Particle Swarm Optimization (PSO) algorithms.
Some relevant applications of such strategies in robotic field can be found in [14, 15, 16, 17]. Among the variety of evolution algorithms, Particle Swarm Optimization (PSO) algorithm [18, 19] seems to be one of the most promising techniques [20]. Particularly, PSO algorithms have less computational complexities and gives better performances [21].
PSO algorithms were successfully applied in several robotic applications, “For example, see [22, 23, 24, 25]”. Particularly, for tuning the controller parameters of robot arms in non constraint environment, several papers were recently proposed, “For example, see [26, 27]”. However, for the constrained motion case study, very few papers were devoted to this topic [28, 29].
Based on the lack of results in this framework, this paper proposes an efficient and fast method for fine tuning the controller parameters of robot manipulators in constrained motion using PSO intelligence. The stability of the constrained robotic system is proved using a Lyapunov-based impedance approach whereas the optimal design of the controller parameters are tuned, in offline, by the PSO algorithm using different index performances in both joint and Cartesian spaces.
The remainder of this paper is organized as follows. In Section 2, the stability conditions using the Lyapunov based impedance controller for constrained robotic systems are presented. In section 3, PSO algorithm is exposed. The case study of fine tuning the controller parameters for a 3DOF robotic system constrained to a circular profile are developed in section 4 where the performances of the proposed strategy are shown by simulation results.
Impedance control
Let consider the dynamics of a serial-chain
where
The Cartesian position of the end-effector of the constrained robotic arm is characterized by a vector X ∊ Rp where p is the task space dimension. Cartesian position is function of the joint displacements such that:
where h(θ): Rn → Rp denotes the direct kinematics. The time derivative of the direct kinematic model (2) yields the following differential kinematic model:
Where
The vector of torques due to the contact generalized forces exerted by the manipulator on the environment can be written as:
The time derivative of the differential kinematic model (3) can be written as:
where
Given a desired Cartesian position of the end-effector Xd ∊ Rp and a desired contact force Fd ∊ Rp, the control problem aim to ensure:
and
The last problem will be solved under the following assumptions:
where Kd, Bd, Md ∊ Rpxp are stiffness, damping and inertia matrices, respectively, and s is the Laplace operator.
For desired stiffness, damping and inertia matrices Kd, Bd, Md ∊ Rpxp and if there exist diagonal gain matrices Kp, Kv, Kf ∊ Rpxp such that the following conditions:
or
are satisfied, then the robotic system described by the dynamical model (1) and the direct kinematic model (2) is asymptotically stable under the constrained force model:
and the control law:
where Kp, Kv, Kf ∊ Rpxp are position, velocity and force gain matrices, respectively.
Let
Consider, now, the constrained robot system described by the dynamic model (1) for the force design (12) and the control law (13). Using the relations (14) and (15) we can write [31, 32]:
where
In order to evaluate the relationship between the dynamics of the constrained robotic system and its energy, we use Lagrange's equation described by [33]:
where
and P(Φ),
Impose, now, to the system (16) to have a Lyapunov Hamiltonian function defined by [33]:
The error system (16) is asymptotically stable if
since T(0,0) = 0, then V(0,0) = 0 so the first Lyapunov condition (24) is verified. The second Lyapunov condition (25) will be verified if we prove that Vp (Φ) defined by:
is positive definite [33] since the kinetic energy
From (27) and (20) we can write:
then:
Let consider the function W given by:
Substituting (20) in (30) we have:
where:
At the equilibrium point we have:
Based on (32), the function W is positive definite at the equilibrium point if K1 is positive definite. Hence the second Lyapunov condition (25) is satisfied if K1 is positive definite.
Using the expression (23) we have:
From equation (19) we can write:
Furthermore,
Substituting (20) in (35) we have:
Substituting (34) and (36) in (33) we obtain:
From (16) we can write:
Substituting the second member of (38) in (37) gives:
Using relations (3), (14) and (15) gives:
The third Lyapunov condition (26) is then verified if K2 is positive definite and K3 is null. Note that K3 is null if I + Kf = 0 or
Overview of PSO algorithm
The particle swarm optimization (PSO) method was firstly introduced by Kennedy and Eberhart [18]. It is a relatively new evolutionary algorithm that may be used to find optimal or near optimal solutions in big search space. The PSO method is developed from study on swarm such as fish schooling and bird flocking. It can be easily implemented, and has stable convergence characteristic with good computational efficiency.
During flight, each particle adjusts its position according to its own experience, and the experience of other particles, making use of the best position encounter by itself and its neighbors. The swarm direction of a particle is defined by the set of particles neighboring the particle and its history of experience. The best previous position of ith particle is recorded and represented as pbesti. The best particle among all the particles in the group is represented as gbest [35].
The PSO concept consists of, at each time step, changing the velocity (or acceleration) of each particle i toward its pbest and the gbest position. For the ith particle, a new velocity and position are updated such that [19]:
for k = 1,2,…, N and i = 1,2,…, M and where:
M Number of particles in a group
N Maximum number of iterations
gbest(k) Best position of the group until iteration k
w(k) Inertia weight factor at iteration k
c1,c2 Acceleration factors
rand () Random numbers between 0 and 1
Rand () Random numbers between 0 and 1
In general, the inertia weight is calculated according to the following equation:
The design steps for implementing the PSO algorithm are given as follow:
Initialize a population array of particles with random positions and velocities on d-dimensional space.
For each particle, evaluate the desired optimization fitness function.
Compare particle's fitness evaluation with its pbesti. If current value is better than pbesti, then set pbesti equal to the current value.
Identify the particle in the neighborhood with the best success so far, and assign it to gbest.
Change the velocity and position of the particle according to equations (41) and (42) respectively.
If a criterion is met (usually a sufficiently good fitness or a maximum number of iterations), go to 7 else go to 2.
The particle that generates the latest gbest is an optimal controller parameter.
To design the impedance controller (13), only the stability condition (11) will be adopted in this paper to ensure that Md ≠ 0p×p. In this case, the force matrix gain is well defined as Kf = -Ip×p. Taking on account of the assumption A4, the member of each individual of the swarm will be composed of the diagonal elements of the gain matrices Kp, Kv ∊ Rpxp. Consequently, whatever the number of degrees of freedom for the constrained robotic arm, the dimension of the individual member will be always 4 for a planar robot and 6 for a three dimensional robot.
Fig. 1 illustrates the block diagram of optimal design of the proposed Lyapunov-based impedance controller for constrained robotic arms using PSO algorithm.

Impedance controller tuned with PSO
A fundamental step in applying PSO algorithm remains in choosing the cost function or performance index which is used to evaluate fitness of each particle. In this paper the following cost functions:
Mean of Root Squared Error (MRSE)
Mean of Absolute Magnitude Error (MAE)
Mean of Time-weighted Magnitude Error (MTE)
Based on (7) and (8) we consider furthermore a multiobjectif optimization problem to be solved where the two objectives to be reached are really in conflict. Furthermore the multiobjectif problem will be solved under the stability constrained conditions (11).
We first try to solve the problem in the joint space by considering the following multiobjectif cost functions:
where:
θi,d(k) design the ith element of desired angular displacement vector. Fj,d(k) and Fj (k) design the jth element of the desired force vector and the jth element of the force vector, respectively.
The optimization problem will be also solved in the Cartesian space by considering the following multiobjectif cost functions:
where:
Xj(k) and Xj,d(k) design the jth element of Cartesian displacement vector and the desired Cartesian displacement vector, respectively.
To verify the stability and performances of the proposed controller tuned by PSO intelligence, a 3DOF robotic arm constrained to circular trajectory is considered (see Fig. 2).

3DOF manipulator at constrained circular motion
The dynamical model (1), kinematic model (2) and differential kinematic models (3) of the 3DOF constrained robotic arm are defined, respectively, by:
where:
The parameters mi, Li, ki and Ii, (i = 1,2,3), design mass, length, position of gravity center and moment of inertia of the links of the 3DOF constrained arm.
Trajectory generation
The desired Cartesian displacement, speed and acceleration of the constrained robotic system are used as inputs of the control laws (13). It is essential then to generate desired trajectories. Assume that joint motion must begin and end regularly such that:
where t0 and tf design initial and terminal times. Reference joint trajectories are chosen as:
where:
In the Cartesian space, we impose a circular motion. To realize this profile, we will introduce a sinusoidal signal on each axis. So, the axis references correspond to a harmony excitation in quadratic phase. Therefore, for a circle radius R, the desired end-effector motion of the constrained robotic system will be defined by:
Simulation Results
Simulation results are conducted solving the dynamical robotic model (1) using relations (2), (3), (4), (5) and (6) for the control law (13) and the force design (12). The parameter data of the robotic system are given by Table 1.
Physical parameters of the robotic arm
Physical parameters of the robotic arm
Desired circular motion is obtained by imposing θi0 = [0 0 0]T and θid = [π π π]T as initial and final joint positions, t0 = 0 and tf = 1s as initial and final times and R = 0.76 m for the circle Radius. The desired circular trajectory is then given by:
PSO intelligence is applied using the variables given by Table 2. To carry out simulation results, two case studies for desired contact force, stiffness, damping and inertia parameters were assessed (see table 3). Fig. 3 and Fig. 4 show the convergence characteristics of cost functions for the two cases with respect to index performances (44)–(49).

Evolution of fitness functions: case1

Evolution of fitness functions: case2
Variables of the PSO algorithm
Case study parameters
Best cost functions and their corresponding controller gain parameters were reported in Tables 4 and 5 using the performance indexes (44)–(46) and in Tables 6 and 7 using the performance indexes (47)–(49). It is clear that optimization procedure with respect to the Cartesian space errors gives better results.
PSO-best controller tuning in the joint space: case1
PSO-best controller tuning in the joint space: case2
PSO-best controller tuning in the Cartesian space: case1
PSO-best controller tuning in the Cartesian space: case2
Best solutions are reported in Table 8 and will be used in the following to illustrate the performances of the PSO-impedance controllers. Fig. 5 and Fig. 6 show the convergence of the PSO algorithm to these solutions with respect to the number of iterations. Fig. 7 and Fig. 8 show the evolution of joint positions and velocities using best controller gains whereas Fig. 9 and Fig. 10 illustrate the tracking performances of the desired forces and the smooth profile of control laws.

Convergence of controller parameters: case1

Convergence of controller parameters: case2

Evolution of joint position and velocity: case1

Evolution of joint position and velocity: case2

Contact force response and control laws: case1

Contact force response and control laws: case2
Case study controller parameters
Position and force errors are depicted in Fig. 11 and Fig. 12, respectively. Results prove the tracking performances. Fig. 13 shows the evolution of the constrained robotic arm to a circular profile.

Position and force errors: case 1

Position and force errors: case 2

Robotic arm constrained to a circular profile
This paper proposes a Lypunov-based impedance controller tuned by a multiobjectif Particle Swarm Intelligence. In order to examine effects of the cost functions on the controller parameter optimization, different performance indexes were used in both join and Cartesian spaces. The PSO-impedance controller was tested on a 3DOF robot constrained to a circular trajectory. The simulation results prove the stability and the performances of the offline tuned controller.
