Abstract
One important issue in a machining robotic cell is the location of the workpiece with respect to the robot. The feasibility of the task, the quality of the final work and the energy consumption, just to mention a few, are all dependent upon it. This can be formulated as an optimization problem where the objective functions are chosen in order to meet desired performance criteria. Typically, the complexity of the problems and the large number of optimization parameters that, usually, are involved, make the genetic algorithms an appropriate tool in this context. In this paper, two optimization problems are formulated: firstly, the power consumed by the manipulator is considered and the problem is solved using a single-objective genetic algorithm; then the stiffness of the manipulator is also included and the respective optimization problem is solved using a multi-objective genetic algorithm. Simulation results are presented for a parallel manipulator robotic cell.
1. Introduction
Robots have been widely used in industry to carry out several tasks, like welding, painting, assembly, pick and place, and palletizing, just to mention a few [1, 2]. On the other hand, CNC machine tools have been exclusively devoted to high precision manufacturing.
Typically, robots have large workspaces and good dexterity, and have become more and more accurate due to important advances in electronics, informatics, control and mechanical design. Recently, robots started to be regarded as low-cost alternatives to machine tools [3-12]. In fact, machining of soft materials (such as polymers and composites), machining of large wood or stone workpieces, and end-machining of middle tolerance parts, are examples of tasks that can be carried out at lower costs using robots. Pre-machining of foundry parts and rapid prototyping are two additional areas where robots can also be used instead of machine tools [8, 9].
Several recent works have dealt with robotic machining. In [13], for example, a method for high-precision drilling using an industrial robot was presented. The robot is equipped with a six degrees-of-freedom (dof) force/torque sensor and an active force control strategy was designed to regulate the interaction forces between the robot and the workpiece. In [14] the authors use a milling serial robot, proposing a method to find the appropriate location of the robot with respect to the workpiece, in order to optimize the manipulability and joint torques. A similar problem was addressed in [15]. In that work, an optimization algorithm was used to find the appropriate position and joint angles of a serial robot, avoiding singular configurations. In [16] the vibration response of a robotic machining system was studied and a method based on the variation of the speed of the spindle was introduced to minimize vibration. Robotic machining has also been used in non-industrial environments. As an example, [17] deals with machining of bones in orthopaedic surgery.
An important issue in a machining robotic cell is the positioning of the workpiece with respect to the robot. The best position depends on the task or, more precisely, on the trajectory and on the forces that the robot exerts on the workpiece. This problem can be formulated as an optimization problem where the objective functions are chosen in order to meet specific performance criteria. Optimization can be a difficult and time-consuming task, because of the great number of optimization parameters and the complexity of the objective functions that usually are involved. The optimization procedures based on evolutionary approaches have been proved as an effective way out [18].
Robot trajectory planning and optimal design are typical optimization problems that are often solved using this class of algorithms. In [19], for example, a Genetic Algorithm (GA)–simplex hybrid optimization method is used to synthesise a spatial 3-RPS parallel manipulator. The method firstly carries out a global search for the solution using a GA and then applies the simplex method for a final local search. In [18] the kinematic design of a 6-dof parallel robotic manipulator for maximum dexterity is analysed. A GA and a neuro-genetic formulation are proposed to solve the optimization problem. In [20] a multi-objective evolutionary algorithm is proposed for optimal trajectory planning of a parallel manipulator. Minimum time and energy are the adopted performance criteria. A similar problem was addressed by [21] where a hybrid strategy was used for time and energy efficient trajectory planning of parallel platform manipulators.
In this paper the optimal location of the workpiece with respect to the robot, in a machining robotic cell is analysed. We formulate the problem supposing that the robot exerts a certain contact force and executes a specific trajectory on the surface of the workpiece. The force and the trajectory might have been computed by a higher-level intelligent layer, taking into account the specific issues related to the machining processes. This topic is not covered in this work.
The adopted robot possesses a parallel structure. Parallel manipulators have considerable advantages over the serial-based ones, such as higher precision and stiffness, and better dynamic characteristics [22, 23].
Two optimization problems are formulated: firstly, the power consumed by the manipulator is considered and the problem is solved using a single-objective GA; then the stiffness of the manipulator is also taken into account and the respective optimization problem is solved using a multi-objective GA.
Bearing these ideas in mind, the paper is organized as follows. Section 2 deals with the manipulator and the respective kinematic model. In section 3 the manipulator dynamic model is presented. Since the manipulator dynamics typically involves demanding calculations, a simple and efficient model is proposed. Section 4 presents the objective functions. In section 5, the optimization problems are formulated and solved using GAs. Finally, conclusions are drawn in section 6.
2. Robot Kinematics
A 6-dof variant of the well-known Stewart platform manipulator [22] is considered. Its mechanical structure comprises a fixed (base) platform and a moving (payload) platform, linked together by six independent, identical, open kinematic chains (Figure 1).

Schematic representation of the kinematic structure of the parallel manipulator
Each chain comprises two links: the first link (linear actuator) is always normal to the base and has a variable length, l i (i = 1, …, 6) with one of its ends fixed to the base and the other one attached, by a universal joint, to the second link; the second link (arm) has a fixed length, L, and is attached to the payload platform by a spherical joint. Points B i and P i are the connecting points to the base and payload platforms. They are located at the vertices of two semi-regular hexagons, inscribed in circumferences of radius r B and r P , that are coplanar with the base and payload platforms. The separation angles between points B1 and B6, B2 and B3, and B4 and B5 are denoted by 2φ B . In a similar way, the separation angles between points P1 and P2, P3 and P4, and P5 and P6 are denoted by 2φ P .
For modelling purposes, two frames, {P} and {B}, are attached to the centre of mass of the moving and base platforms, respectively, the generalized position (pose) of frame {P} relative to frame {B} may be represented by the vector:
where
S() and C() correspond to the sine and cosine functions, respectively.
The inverse velocity kinematics can be represented by the inverse kinematic jacobian,
Vector
The inverse jacobian matrix is given by equation (4), which can be computed using vector algebra.
All vectors are obtained analyzing a kinematic chain of the parallel manipulator (Figure 2). Vector
where
As the angular velocity and the time derivatives of the Euler angles are related by
the following equation can be written:
where

Schematic representation of a kinematic chain
3. Robot Dynamics
Robot dynamics can be computed through the well known Lagrange Equation (LE). Expressing LE as a function of the moving platform generalized position,
where K and P are the total kinetic and potential energies, and
Vector
can be defined, which represents the momentum vector applied on the mobile platform and expressed in the base frame {B}. The actuators forces,
3.1. Manipulator Kinetic Energy
The total kinetic energy, K, can be computed as the sum of the kinetic energies of all rigid bodies: the moving platform, the 6 actuators and the 6 fixed-length links:
where K
P
,
3.1.1. Moving Platform Kinetic Energy
The moving platform kinetic energy is the sum of two components, as shown in equation (15), the translational kinetic energy, KP(tra), and the rotational kinetic energy, KP(rot).
The translational kinetic energy may be easily computed using the following equation:
where
The rotational kinetic energy may be computed using equation (18):
Matrix
Using equations (7) and (19) we have:
3.1.2. Actuators Kinetic Energy
As the actuators can only move perpendicularly to the base, their angular velocity relative to frame {B} is always zero. If the actuators are assumed to be equal, and the centre of mass of each actuator, cm A , is located at a fixed distance, a cm , from the actuator to the fixed-length link connecting point (Figure 3), the position of the centre of mass relative to frame {B} is:
The linear velocity of the centre of mass of the actuator,

Actuator centre of mass position
The kinetic energy of each actuator is
where m A is the actuator mass. Thus, using the velocity kinematics, we may write:
where
Equation (24) may be rewritten in the following final form:
3.1.3. Fixed-length Links Kinetic Energy
Computation of the fixed-length links dynamic contributions requires high computational effort. To simplify the problem, each fixed-length link is modelled as a zero-mass virtual link connecting two point masses located at its ends. This is a reasonable simplification as the fixed-length links are connected to the moving platform and to the actuators by universal joints. We consider that the fixed-length link mass, m
L
, is the sum of two components, mL1 is a point mass located at the connection point between the moving platform and the fixed-length link, and mL2 is a point mass located at the connection point between the actuator and the fixed-length link:
4. Objective Functions
Several objective functions may be adopted, depending on the robotic cell and the task to be carried out.
Firstly, the mechanical power dissipated by the robot actuators, P act , along the discretized trajectory is analysed. Mathematically, the mechanical power is given by (34):
where K is the total number of points, that depends on the discretizing period and the trajectory time length. This function should be minimized.
Another important objective in robotic machining is the maximization of the stiffness of the manipulator along its trajectory. The stiffness may be regarded as a measure of the ability of the robot to resist deformation due to the action of external forces. This characteristic is especially important in applications that involve interaction between the manipulator and the environment, affecting the precision of the robot and the quality of the executed task. On the other hand, higher stiffness typically allows higher velocities and lower vibrations of the mechanical structure. At any pose the stiffness of the robot can be characterized by the stiffness matrix, which relates the Cartesian forces and torques, applied on the end-effector, to the corresponding linear and angular displacements.
Giving the equation (3) we may write
where
where
Adopting a finite stiffness in each actuator, given by k
i
, then the corresponding force, τ
i
, and displacement, Δl
i
, are related by
with
Using equations (35) to (37), results in:
where
In the particular case of identical actuators, then k i = k and
Mathematically, the objective function that is adopted to quantify the stiffness of the manipulator is given by the trace of matrix
We illustrate our approach considering a simple robotic task where the robot has to follow a given surface, exerting a constant normal force, F N . The trajectory of the robot is specified in terms of the position, velocity and acceleration with respect to a local frame attached to the workpiece. The trajectory is then computed with respect to the base of the manipulator and the optimization algorithm is run.
In this example the workpiece is a cone and the robot must follow a helicoidal trajectory on the surface of the cone (Figure 4). The parametric equations of the trajectory with reference to the local frame {W} attached to the workpiece are:
The corresponding homogeneous matrix is
where
Then, the trajectory of the robot with respect to the base frame, {B}, expressed in homogeneous coordinates is:
where,

Helicoidal trajectory on the surface of a cone
5. Optimization
5.1. Single-objective Optimization
The optimization is carried out by a genetic algorithm (GA). A GA is a search method that models the natural selection process. The algorithm, proposed by Holland [24], became very popular because it can solve complex problems with little knowledge about the optimization landscape. Moreover, it is very general and can work in any search space. GAs use a set of candidate solutions, known as population, in which each individual represents a possible problem solution. The GA begins initializing the population P 0 , randomly. Then, these solutions interact over several generations based on selection, crossover and mutation in order to achieve better regions of the search space. The search is guided, by the selection operator, based on the fitness function that gives a measure of the quality of the solutions. This measure is used to choose solutions with good genetic characteristics into the next generation. The cycle stops when the algorithm finds the optimal solution or a pre-defined number of generations is reached. Figure 5 illustrates the possible pseudo-code of a simple GA.
The constants a and b, that define the trajectory of the robot, as defined in equation (35), are a = 0.001 and b = 0.01. The contact force is F N = 200 N. The trajectory time length is 10 s and the discretizing period is 10−4 s.

Pseudo-code of a simple GA
The robot is working up-side-down (Figure 6). The kinematic and dynamic parameters are shown in Table 1.

Schematic representation of the manipulator and the workpiece
Kinematic and dynamic parameters
The coordinates of the workpiece (position and orientation) are codified by real values through the vector
In order to draw several different good solutions in one GA run, a ε strategy is used. The final solutions have all the same fitness value, but the values of the parameters are different from each other. At the end of each cycle, it is used a
The algorithm draws a set of solutions that converge to a line with good diversity, corresponding to the location of the workpiece
Figures 7 to 9 show the variation of P act , along the trajectory, for the case where the workpiece is in its optimal location and z W = 0.5 m.

Variation of P act as a function of x P and y P , for the optimal location of the workpiece

Variation of P act as a function of x P and z P , for the optimal location of the workpiece

Variation of P act as a function of y P and z P , for the optimal location of the workpiece
In Figures 10 to 12 we can see the variation of P act , along the trajectory, for the case where the workpiece is away from its optimal location. It is clear that the required power in the actuators is higher than in the previous situation.

Variation of P act as a function of x P and y P , for the workpiece location [0.1 0.05 0.5 0 0 30°] T

Variation of P act as a function of x P and z P , for the workpiece location [0.1 0.05 0.5 0 0 30°] T

Variation of P act as a function of y P and z P , for the workpiece location [0.1 0.05 0.5 0 0 30°] T
5.2. Multi-objective Optimization
Initially, GAs were designed to optimize single-objective problems. However, it was realized that, with some minor modifications, the algorithms could also solve problems involving, simultaneously, more than one objective [26]. To this end, GAs take advantage of their population to store a solution set representative of the non-dominated front. Thus, each population element is used to hold a non-dominated solution. Therefore, during the execution of the algorithm, the solutions are guided by the objective functions, using techniques that promote the dispersion of the solution [27] towards the non-dominated front. This kind of algorithms has been successfully used in many engineering problems, particularly in robotics [20, 28-29].
In this subsection, the mechanical power dissipated by the actuators, P act , defined by equation (34), and the structural stiffness of the manipulator, given by equation (41), computed along the trajectory of the robot, are adopted as the optimization criteria. A multi-objective optimization algorithm, based on NSGAII [26], with maximin sorting scheme selection [30] is used. The crossover and mutation probabilities are p c = 0.8 and p m = 0.04, respectively. The search is carried out by a 100 elements population solution during 1000 generations.
Several independent optimizations were performed and the algorithm always converged to the same non-dominated front. Figure 13 illustrates one of the experiments, underlining one possible solution and the respective parameters. As can be seen, the two objectives are quarrelsome and several alternative solutions can be chosen as the desired workpiece position.

Pareto front of optimal solutions
6. Conclusion
In a machining robotic cell, the best location for the workpiece to be machined depends on the task or, more precisely, on the trajectory and on the forces that the robot exerts on the workpiece. To find the best location, we formulate the problem as an optimization problem, and propose a GA to compute the optimal solution. Firstly we adopt a single objective function and then a multi-objective problem is considered. The described approach is absolutely generic and can be used with different optimization criteria and restrictions. This study didn't take into account the specific issues associated with the machining process, which determine the trajectory of the robot and the machining force. But the approach can be used for arbitrary trajectories and interaction forces.
