Abstract
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,
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
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
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,
where
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,
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,
The linear velocity of the centre of mass of the actuator,

Actuator centre of mass position
The kinetic energy of each actuator is
where
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,
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,
where
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
with
Using equations (35) to (37), results in:
where
In the particular case of identical actuators, then
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,
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
The constants

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
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

Variation of

Variation of

Variation of
In Figures 10 to 12 we can see the variation of

Variation of

Variation of

Variation of
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,
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.
