Keywords

1 Introduction

Currently, robots become more and more popular for a variety of technological processes, including high-speed precision machining. For this process, external loading caused by the machining force is applied on the robot tool. This force is generated by the interaction between the tool mounted on the robot end-effector and the workpiece during the material removal [1]. It is a contact force and it is distributed along the affected area of the tool cutting part. To evaluate the influence and to analyze the robot behavior while machining, the cutting force should be defined either experimentally or using accurate mathematical model.

To evaluate the force caused by interaction between the tool and the workpiece, two approaches can be used. The static approach allows computing the average cutting force without any consideration of dynamic aspect in machining system. This force serves as an external loading of the robot. This approach is widely used in analysis of conventional machining processes using CNC machines [2], where the stiffness is high. In contrast, robots have relatively low structural stiffness. For this reason, in the case of robotic-based machining, an additional source of dynamic displacements of the end-effector with respect to the desired trajectory induced by robot compliance may arise. Such behavior leads to the variable contact between the machining tool and the workpiece. Thus, the generated contact force depends on the current position of the robot end-effector on the trajectory. Consequently, the cutting force cannot be evaluated correctly using the static approach. In this case, the dynamic approach, which will be used in the chapter, is required. It is based on computing of the force at each instant of machining process that defines loading of the robot for the next instant of processing. As a result, the dynamic aspect of robot motion under such variable cutting force can be examined for whole process.

Usually, in the robot-based machining this force causes essential deflections that decrease the quality of the final product. The problem of the robot error compensation can be solved in two ways that differ in degree of modification of the robot control software:

  1. (a)

    by modification of the manipulator model which better suits to the real manipulator and is used by the robot controller (in simple case, it can be limited by tuning of the nominal manipulator model, but may also involve essential model enhancement by introducing additional parameters, if it is allowed by a robot manufacturer);

  2. (b)

    by modification of the robot control program that defines the prescribed trajectory in Cartesian space (here, using relevant error model, the input trajectory is generated in such way that under the loading the output trajectory coincides with the desired one, while input trajectory differs from the target one).

Moreover, with regard to the robot-based machining, there is a solution that does not require force/torque measurements or computations [1], where the target trajectory for the robot controller is modified by applying the “mirror” technique. An evident advantage of this technique is its applicability to the compensation of all types of the robot errors, including geometrical and compliance ones. However, this approach requires carrying out additional preliminary experiments which are quite expensive. So, it is suitable for the large-scale production only. Another compensation methodology has been proposed by Eastwood and Webb [3] that was used for gravitational deflection compensation for hybrid parallel kinematic machines.

This chapter focuses on the modification of control program that is considered to be more realistic in practice. This approach requires also accurate stiffness model of the manipulator. From point of view of stiffness analysis, the external and forces directly influence on the manipulator equilibrium configuration and, accordingly, may modify the stiffness properties. So, they must be undoubtedly taken into account while developing the stiffness model. However, in most of the related works the Cartesian stiffness matrix has been computed for the nominal configuration [4, 5]. Such approach is suitable for the case of small deflections only. For the opposite case, the most important results have been obtained in [68], which deal with the stiffness analysis of manipulators under the end-point loading.

Thus, to compensate errors caused by the machining process, it is required to have an accurate stiffness model and precise cutting force model. In contrast to the previous works, the compliance error compensation technique presented in this work is based on the non-linear stiffness model of the manipulator [7] and dynamic model of technological process that generates the cutting force.

2 Problem Statement

For the compliance errors, the compensation technique must rely on two components. The first of them describes distribution of the stiffness properties throughout the workspace and is defined by the stiffness matrix as a function of the joint coordinates. The second component describes the forces/torques acting on the end-effector while the manipulator is performing its machining task (manipulator loading).

The stiffness matrix required for the compliance errors compensation highly depends on the robot configuration and essentially varies throughout the workspace. From general point of view, full-scale compensation of the compliance errors requires essential revision of the manipulator model embedded in the robot controller. In fact, instead of conventional geometrical model that provides inverse/direct coordinate transformations from the joint to Cartesian spaces and vice versa, here it is necessary to employ the so-called kinetostatic model [9]. It is essentially more complicated than the geometrical model and requires rather intensive computations that are presented in Sect. 13.3.

The dynamic behavior of the robot under the loading \(\mathbf{F}\) caused by technological process can be described as

$$\begin{aligned} {\mathbf {M}}_{\mathrm{{C}}} {\varvec{\delta }} \ddot{\mathbf{t}}+\mathbf{C}_{\mathrm{{C}}} {\varvec{\delta }} \dot{\mathbf{t}}+\mathbf{K}_{\mathrm{{C}}} {\varvec{\delta }} \mathbf{t}=\mathbf{F} \end{aligned}$$
(13.1)

where \(\mathbf{M}_{\mathrm{{C}}} \) is \(6\times 6\) mass matrix that represents the global behavior of the robot in terms of natural frequencies, \(\mathbf{C}_{\mathrm{{C}}}\) is \(6\times 6\) damping matrix, \(\mathbf{K}_{\mathrm{{C}}}\) is \(6\times 6\) Cartesian stiffness matrix of the robot under the external loading \(\mathbf{F}, {\varvec{\delta }} \mathbf{t}, {\varvec{\delta }} \dot{\mathbf{t}}\) and \({\varvec{\delta }} \ddot{\mathbf{t}}\) are dynamic displacement, velocity and acceleration of the tool end-point in a current moment respectively [10].

In general, the cutting force \(F_{c}\) has a nonlinear nature and depends on many factors such as cutting conditions, properties of workpiece material and tool cutting part, etc [11]. But, for given tool/workpiece combination, the force \(F_{c}\) could be approximated as a function of an uncut chip thickness h, which represents the desired thickness to cut at each instant of machining.

Hence, to reduce the errors caused by the cutting forces in the robotic-based machining it is required to obtain an accurate elastostatic model of the robot and elastodynamic model of the machining process. These problems are addressed in the following sections taking into account some particularities of the considered application (robotic-based milling).

Fig. 13.1
figure 1

VJM model of industrial robot with end-point and auxiliary loading

3 Manipulator Model

3.1 Elastostatic Model

Elastostatic model of a serial robot is usually defined by its Cartesian stiffness matrix, which should be computed in the neighborhood of loaded configuration. Let us propose numerical technique for computing static equilibrium configuration for a general type of serial manipulator. Such manipulator may be approximated as a set of rigid links and virtual joints, which take into account elastostatic properties (Fig. 13.1). Since the link weight of serial robots is not negligible, it is reasonable to decompose it into two parts (based on the link mass centre) and apply them to the both ends of the link. All this loadings will be aggregated in a vector \(\mathbf{G}=\left[ {\mathbf{G}_1 ...\mathbf{G}_n } \right] \), where \(\mathbf{G}_i \) is the loading applied to the ith node-point. Besides, it is assumed that the external loading \(\mathbf{F}\) (caused by the interaction of the tool and the workpiece) is applied to the robot end-effector.

Following the principle of virtual work, the work of external forces \(\mathbf{G}, \mathbf{F}\) is equal to the work of internal forces \({\varvec{\tau }}_\theta \) caused by displacement of the virtual springs \(\updelta {\varvec{\uptheta }}\)

$$\begin{aligned} \sum _{j=1}^n {\left( {\mathbf{G}_j ^{\mathrm{T}}\cdot {\updelta }\mathbf{t}_j } \right) } +\mathbf{F}^{\mathrm{T}}\cdot {\updelta }\mathbf{t}={\varvec{\tau }}_{\uptheta }^{\mathrm{T}}\cdot {\updelta }{\varvec{\uptheta }} \end{aligned}$$
(13.2)

where the virtual displacements \({\updelta }\mathbf{t}_j\) can be computed from the linearized geometrical model derived from \({\updelta }\mathbf{t}_j =\mathbf{J}_{\uptheta }^{(j)} {\updelta }{\varvec{\uptheta }}, j=1{\ldots }n\), which includes the Jacobian matrices \(\mathbf{J}_{\uptheta }^{(j)} ={\partial \mathbf{g}_j \left( {\mathbf{q},{\varvec{\uptheta }}} \right) }/{\partial {\varvec{\uptheta }}}\) with respect to the virtual joint coordinates.

So, expression (13.2) can be rewritten as

$$\begin{aligned} \sum _{j=1}^n {\left( {\mathbf{G}_{j}^{\mathrm{T}}\cdot \mathbf{J}_{\uptheta }^{(j)} \cdot {\updelta }{\varvec{\uptheta }}} \right) } +\left( {\mathbf{F}^{\mathrm{T}}\cdot \mathbf{J}_{\uptheta }^{(n)} \cdot {\updelta }{\varvec{\uptheta }}} \right) ={\varvec{\uptau }}_{\uptheta } ^{\mathrm{T}}\cdot {\updelta }{\varvec{\uptheta }} \end{aligned}$$
(13.3)

which has to be satisfied for any variation of \({\updelta }{\varvec{\uptheta }}\). It means that the terms regrouping the variables \({\updelta }{\varvec{\uptheta }}\) have the coefficients equal to zero. Hence the force balance equations can be written as

$$\begin{aligned} {\varvec{\uptau }}_{\uptheta } =\sum _{j=1}^n {\mathbf{J}}_{\uptheta }^{{(j)}{\mathrm{T}}}\cdot \mathbf{G}_{j} +\mathbf{J}_{\uptheta }^{{(n)}{\mathrm{T}}}\cdot \mathbf{F} \end{aligned}$$
(13.4)

These equations can be re-written in block-matrix form as

$$\begin{aligned} {\varvec{\uptau }}_{\uptheta } =\mathbf{J}_{\uptheta }^{\mathrm{{(G)}}{\mathrm{T}}}\cdot \mathbf{G}+\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}{\mathrm{T}}}\cdot \mathbf{F} \end{aligned}$$
(13.5)

where \(\mathbf{J}_{\uptheta }^\mathrm{{(F)}} =\mathbf{J}_{\uptheta }^{(n)} , \mathbf{J}_{\uptheta }^\mathrm{{(G)}} =\left[ {\mathbf{J}_{\uptheta }^{(1)\mathrm{T}}... \mathbf{J}_{\uptheta }^{(n)\mathrm{T}}} \right] ^{\mathrm{T}}, \mathbf{G}=\left[ {\mathbf{G}_1^{\mathrm{T}}...\mathbf{G}_{n}^{\mathrm{T}}} \right] ^{\mathrm{T}}\). Finally, taking into account the virtual spring reaction \({\varvec{\uptau }}_{\uptheta } =\mathbf{K}_{\uptheta } \cdot {\varvec{\uptheta }}\), where \(\mathbf{K}_{\uptheta } =diag\left( \mathbf{K}_{{\uptheta }_1} ,...,\mathbf{K}_{{\uptheta }_\mathrm{{n}}} \right) \), the desired static equilibrium equations can be presented as

$$\begin{aligned} \mathbf{J}_{\uptheta }^{{\mathrm{{(G)}}}{\mathrm{T}}}\cdot \mathbf{G}+\mathbf{J}_{\uptheta }^{{\mathrm{{(F)}}}{\mathrm{T}}}\cdot \mathbf{F}=\mathbf{K}_{\uptheta } \cdot {\varvec{\uptheta }} \end{aligned}$$
(13.6)

To obtain a relation between the external loading \(\mathbf{F}\) and internal coordinates of the kinematic chain \({\varvec{\uptheta }}\) corresponding to the static equilibrium, Eq. (13.6) should be solved either for different given values of \(\mathbf{F}\) or for different given values of \(\mathbf{t}\). Let us solve the static equilibrium equations with respect to the manipulator configuration \({\varvec{\uptheta }}\) and the external loading \(\mathbf{F}\) for given end-effector position \(\mathbf{t}=\mathbf{g}\left( {\varvec{\uptheta }} \right) \) and the function of auxiliary-loadings \(\mathbf{G}\left( {\varvec{\uptheta }} \right) \)

$$\begin{aligned} \mathbf{K}_{\uptheta } \cdot {\varvec{\uptheta }}=\mathbf{J}_{\uptheta }^{{\mathrm{{(G)}}}{\mathrm{T}}}\mathbf{G}+\mathbf{J}_{\uptheta }^{{\mathrm{{(F)}}}{\mathrm{T}}}\mathbf{F}; \mathbf{t}=\mathbf{g}\left( {\varvec{\uptheta }} \right) ; \mathbf{G}=\mathbf{G}\left( {\varvec{\uptheta }} \right) \end{aligned}$$
(13.7)

where the unknown variables are \(\left( {{\varvec{\uptheta }},\mathbf{F}} \right) \).

Since usually this system has no analytical solution, iterative numerical technique can be applied. So, the kinematic equations may be linearized in the neighborhood of the current configuration \({\varvec{\uptheta }}_i \)

$$\begin{aligned} \mathbf{t}_{i+1} =\mathbf{g}\left( {{\varvec{\uptheta }}_i } \right) +\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} \left( {{\varvec{\uptheta }}_i } \right) \cdot \left( {{\varvec{\uptheta }}_{i+1} -{\varvec{\uptheta }}_i } \right) ; \end{aligned}$$
(13.8)

where the subscript ‘i’ indicates the iteration number and the changes in Jacobians \(\mathbf{J}_{\uptheta }^{\mathrm{{(G)}}} , \mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} \) and the auxiliary loadings \(\mathbf{G}\) are assumed to be negligible from iteration to iteration. Correspondingly, the static equilibrium equations in the neighborhood of \({\varvec{\uptheta }}_i \) may be rewritten as

$$\begin{aligned} \mathbf{J}_{\uptheta }^{{\mathrm{{(G)}}}{\mathrm{T}}}\cdot \mathbf{G}+\mathbf{J}_{\uptheta }^{{\mathrm{{(F)}}}{\mathrm{T}}}\cdot \mathbf{F}_{i+1} =\mathbf{K}_{\uptheta } \cdot {\varvec{\uptheta }}_{i+1} \end{aligned}$$
(13.9)

Thus, combining (13.8), (13.9) and expression for \({\varvec{\uptheta }}=\mathbf{K}_{\uptheta }^{-1}(\mathbf{J}_{\uptheta }^{{\mathrm{{(G)}}}{\mathrm{T}}}\cdot \mathbf{G}+\mathbf{J}_{\uptheta }^{{\mathrm{{(F)}}}{\mathrm{T}}}\cdot \mathbf{F})\), the unknown variables \(\mathbf{F}\) and \({\varvec{\uptheta }}\) can be computed using following iterative scheme

$$\begin{aligned} \mathbf{F}_{i+1}&=\left( {\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} \cdot \mathbf{K}_{\theta }^{-1}\cdot \mathbf{J}_{\uptheta }^{{\mathrm{{(F)}}}{\mathrm{T}}}} \right) ^{-1}\left( {\;\mathbf{t}_{i+1} -\mathbf{g}\left( {{\varvec{\uptheta }}_i } \right) +\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} {\varvec{\uptheta }}_i -\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} \mathbf{K}_{\theta }^{-1}\mathbf{J}_{\uptheta }^{{\mathrm{{(G)}}}{\mathrm{T}}}\mathbf{G}_i } \right) \nonumber \\ {\varvec{\uptheta }}_{i+1}&=\mathbf{K}_{\uptheta }^{-1}\left( {\mathbf{J}_{\uptheta }^{{\mathrm{{(G)}}}{\mathrm{T}}}\cdot \mathbf{G}_i +\mathbf{J}_{\uptheta }^{{\mathrm{{(F)}}}{\mathrm{T}}}\cdot \mathbf{F}_{i+1} } \right) \end{aligned}$$
(13.10)

The proposed algorithm allows us to compute the static equilibrium configuration for the serial robot under external loadings applied to any point of the manipulator and the loading from the technological process.

3.2 Stiffness Matrix

In order to obtain the Cartesian stiffness matrix, let us linearize the force-deflection relation in the neighborhood of the equilibrium. Following this approach, two equilibriums that correspond to the manipulator state variables \((\mathbf{F}, {\varvec{\uptheta }}, \mathbf{t})\) and \((\mathbf{F}+{\updelta }\mathbf{F}, {\varvec{\uptheta }}+{\updelta }{\varvec{\uptheta }}, \mathbf{t}+{\updelta }\mathbf{t})\) should be considered simultaneously. Here, notations \({\updelta }\mathbf{F}, {\updelta }\mathbf{t}\) define small increments of the external loading and relevant displacement of the end-point. Finally, the static equilibrium equations may be written as

$$\begin{aligned} \mathbf{t}=\mathbf{g}\left( {\varvec{\uptheta }} \right) ; \quad \mathbf{K}_{\uptheta } \cdot {\varvec{\uptheta }}=\mathbf{J}_{\uptheta }^\mathrm{{(G)\mathrm{T}}}\cdot \mathbf{G}+\mathbf{J}_{\uptheta }^\mathrm{{(F)\mathrm{T}}}\cdot \mathbf{F} \end{aligned}$$
(13.11)

and

$$\begin{aligned}&\mathbf{t}+{\updelta }\mathbf{t}=\mathbf{g}\left( {{\varvec{\uptheta }}+{\updelta }{\varvec{\uptheta }}} \right) \\&\mathbf{K}_{\uptheta } \cdot \left( {{\varvec{\uptheta }}+{\updelta }{\varvec{\uptheta }}} \right) =\left( {\mathbf{J}_{\uptheta }^{\mathrm{{(G)}}} +{\updelta }\mathbf{J}_{\uptheta }^{\mathrm{{(G)}}} } \right) ^{\mathrm{T}}\cdot \left( {\mathbf{G}+{\updelta }\mathbf{G}} \right) +\left( {\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} +{\updelta }\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} } \right) ^{\mathrm{T}}\cdot \left( {\mathbf{F}+{\updelta }\mathbf{F}} \right) \nonumber \end{aligned}$$
(13.12)

where \(\mathbf{t, F, G, K}_{\uptheta } , {\varvec{\uptheta }}\) are assumed to be known.

After linearization of the function \(\mathbf{g}({\varvec{\uptheta }})\) in the neighborhood of the loaded equilibrium, the system (13.11), (13.12) is reduced to equations

$$\begin{aligned} \begin{aligned}&{\updelta }\mathbf{t}=\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} {\updelta }{\varvec{\uptheta }} \\&\mathbf{K}_{\uptheta } \cdot {\updelta }{\varvec{\uptheta }}={\updelta }\mathbf{J}_{\uptheta }^{\mathrm{{(G)}}} \mathbf{G}+\mathbf{J}_{\uptheta }^{\mathrm{{(G)}}} {\updelta }\mathbf{G}+{\updelta }\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} \mathbf{F}+\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} {\updelta }\mathbf{F} \\ \end{aligned} \end{aligned}$$
(13.13)

which defines the desired linear relations between \({\updelta }\mathbf{t}\) and \({\updelta }\mathbf{F}\). In this system, small variations of Jacobians may be expressed via the second order derivatives \({\updelta }\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} =\mathbf{H}_{\uptheta \uptheta }^{\mathrm{{(F)}}} \cdot {\updelta }{\varvec{\uptheta }}, {\updelta }\mathbf{J}_{\uptheta }^{\mathrm{{(G)}}} =\mathbf{H}_{\uptheta \uptheta }^{\mathrm{{(G)}}} \cdot {\updelta }{\varvec{\uptheta }}\), where

$$\begin{aligned} \mathbf{H}_{\uptheta \uptheta }^{\mathrm{{(G)}}} =\sum _{j=1}^n {{\partial ^{2}\mathbf{g}_j ^{T}\mathbf{G}_j }/{\partial {\varvec{\uptheta }}^{2}}} ;\qquad \mathbf{H}_{\uptheta \uptheta }^{\mathrm{{(F)}}} ={\partial ^{2}\mathbf{g}^{T}\mathbf{F}}/{\partial {\varvec{\uptheta }}^{2}} \end{aligned}$$
(13.14)

Also, the auxiliary loading \(\mathbf{G}\) may be computed via the first order derivatives as \({\updelta }\mathbf{G}={\partial \mathbf{G}}/{\partial {\varvec{\uptheta }}}\cdot {\updelta }{\varvec{\uptheta }}\)

Further, let us introduce additional notation

$$\begin{aligned} \mathbf{H}_{\uptheta \uptheta } =\mathbf{H}_{\uptheta \uptheta }^{\mathrm{{(F)}}} +\mathbf{H}_{\uptheta \uptheta }^{\mathrm{{(G)}}} +\mathbf{J}_{\uptheta }^{{\mathrm{{(G)}}}{\mathrm{T}}}\cdot {\partial \mathbf{G}}/{\partial {\varvec{\uptheta }}} \end{aligned}$$
(13.15)

which allows us to present system (13.13) in the form

$$\begin{aligned} \left[ {{\begin{array}{l} {{\updelta }\mathbf{t}} \\ \mathbf{0} \\ \end{array} }} \right] =\left[ {{\begin{array}{lc} \mathbf{0} &{} \mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} \\ \mathbf{J}_{\uptheta }^{{\mathrm{{(F)}}}{\mathrm{T}}} &{} {-\mathbf{K}_{\uptheta } +\mathbf{H}_{\uptheta \uptheta }} \\ \end{array} }} \right] \cdot \left[ {{\begin{array}{l} {{\updelta }\mathbf{F}} \\ {{\updelta }{\varvec{\uptheta }}} \\ \end{array} }} \right] \end{aligned}$$
(13.16)

So, the desired Cartesian stiffness matrices \(\mathbf{K}_\mathrm{{C}} \) can be computed as

$$\begin{aligned} {\begin{array}{l} {\mathbf{K}_\mathrm{{C}} } \\ \end{array} }=\left( {\mathbf{J}_{\uptheta }^{\mathrm{{(F)}}} (\mathbf{K}_{\uptheta } -\mathbf{H}_{\uptheta \uptheta })^{-1}\mathbf{J}_{\uptheta }^{{\mathrm{{(F)}}}{\mathrm{T}}}} \right) ^{-1} \end{aligned}$$
(13.17)

Below, this expression will be used for computing of the elastostatic deflections of the robotic manipulator.

3.3 Reduced Mass Matrix

To evaluate the dynamic behavior of the robot under the loading, in addition to the Cartesian stiffness matrix \(\mathbf{K}_{\mathrm{{C}}} \) it is required to define the Cartesian mass matrix \(\mathbf{M}_{\mathrm{{C}}} \). This mass matrix has the same dimension as \(\mathbf{K}_{\mathrm{{C}}} \) and can be obtained using some model reduction techniques. Comprehensive analysis and definition of this matrix have been proposed in [10]. Here, let us summarize the main results that will be used further.

To reduce the mass matrix dimension, model reduction techniques are applied for decreasing the size of the link mass matrices and also for the robot total mass matrix. Two main ways can be followed to reduce the size of the link mass matrices. The first one consists in discretizing the beam j into \(p_{j}\) rigid links and springs and to express their displacements as a function of the beam extremity displacements. However, such numerical method must be repeated for each link and, thus, increases the size of the algorithm and decreases its efficiency. As a result, it is preferred to use the following procedure which allows analytical expressions to be obtained for the reduced link mass matrices.

Let us consider the link j, modeled as a beam (Fig. 13.2). At this beam is attached a local frame represented by the vectors \(\mathbf{{x}}_\mathbf{{j}}, \mathbf{{y}}_\mathbf{{j}}\) and \(\mathbf{{z}}_\mathbf{{j}}\). Before any deformation of the system, the beam j is linked to beams (\(j-1\)) and (\(j+1\)) at points \(O_{j}\) and \(O_{j+1}\), respectively (Fig. 13.2). After deformation of the robot, the beam extremity located at \(O_{j}\) is displaced from \({\varvec{\delta }} \mathbf{{t}}_{j-1} =\left[ {\delta t_{j-1}^1 ,\delta t_{j-1}^2 ,\ldots ,\delta t_{j-1}^6 } \right] ^{T}\) and the one located at \(O_{j+1}\) is displaced from \({\varvec{\delta }} \mathbf{{t}}_j =\left[ {\delta t_{j}^{1} ,\delta t_{j}^{2} ,\ldots ,\delta t_{j}^{6} } \right] ^{T}\), where the three first components of each vector correspond to the translational displacements along local \(\mathbf{x }_\mathbf{j }, \mathbf{y }_\mathbf{j }\) and \(\mathbf{z }_\mathbf{j }\) axes, respectively, and the three last components to the rotational displacements along the same axes.

The general formula for the kinetic energy of an elastic Bernoulli beam is equal to:

$$\begin{aligned} T_{j} =1/2\int \limits _{0}^{L_j } {\rho _j {\varvec{\dot{\delta }}}_j^T \mathbf{Q}_j {\varvec{\dot{\delta }}}_j dx} ;\qquad \mathbf{Q}_j =\mathrm{{diag}}\left( {A_j ,A_j ,A_j I_{j}^p ,I_j^y ,I_j^z } \right) \end{aligned}$$
(13.18)

In this expression, \({\varvec{\dot{\delta }}}_j \) represents the velocity of the beam cross-section located at position x from the local reference frame (Fig. 13.2), \(L_{j}\) is the length of the beam \(j,\rho _{j}\) the mass density at cross-section \(x,A_{j}\) its area, \(I_{j}^{p} \) its torsional constant and \(I_{j}^{y} , I_j^z \), the quadratic momentums along \(\mathrm{{y}}_{j}\) and \(\mathrm{{z}}_{j}\), respectively.

Fig. 13.2
figure 2

Displacements and elastic deformations of a beam

For the lth natural mode \(\omega _{l}\), the kinetic energy can be rewritten as:

$$\begin{aligned} T_{jl} =1/2\omega _l^2 \cos ^{2}\left( {\omega _l t+\varphi _l } \right) \int \limits _0^{L_j } {\rho _j {\varvec{\delta }}_j^T \mathbf{Q}_j {\varvec{\delta }}_j dx} \end{aligned}$$
(13.19)

\(\mathbf{{\delta }}_{j}\) being the amplitude of the displacement of the beam cross-section located at position x from the local reference frame (Fig. 13.2).

In the Rayleigh-Ritz approximation, considering that the deformations due to the natural vibrations are similar to those obtained when an external load is applied at the robot end-effector only, each link of the structure will deform due to the stresses transmitted through the robot joints at points \(O_{j}\). As a result, the deformations \({\varvec{\upvarepsilon }}_{j}\) of the beam cross-section can be approximated by the deformations of a tip-loaded beam

$$\begin{aligned} {\varvec{\upvarepsilon }}_j =\mathrm{{diag}}\left( {f_j ,g_j ,g_j ,f_j ,h_j ,h_j } \right) {\varvec{\updelta \!\uptheta }}_j \end{aligned}$$
(13.20)

where \({\varvec{\updelta \!\uptheta }}_j ={\varvec{\upvarepsilon }}_j \left( {x=L_j } \right) \) represents the deformation of the beam at its tip and

$$\begin{aligned} f_j \left( x \right) =x/{L_j },\;g_j \left( x \right) ={0.5x^{2}\left( {3L_j -x} \right) }/{L_j^3 }, h_j \left( x \right) =2{x\left( {L_j -0.5x} \right) }/{L_j^2 } \end{aligned}$$
(13.21)

As a result, the global displacement \({\varvec{\updelta }}_{j}\) of the beam cross-section at x can be expressed as a sum of two terms:

$$\begin{aligned} {\varvec{\delta }}_j =\left[ {{\begin{array}{ll} {\mathbf{I}_3 }&{}\quad {\mathbf{D}_{\left( \times \right) } } \\ {\mathbf{0}_3 }&{}\quad {\mathbf{I}_3 } \\ \end{array} }} \right] {\varvec{\delta }} \mathbf{{t}}_{j-1} +{\varvec{\upvarepsilon }}_j , \mathrm{{with}}\;D_{\left( \times \right) } =\left[ {{\begin{array}{ccc} 0&{}\quad 0&{}\quad 0 \\ 0&{}\quad 0&{}\quad {-x} \\ 0&{}\quad x&{}\quad 0 \\ \end{array} }} \right] \end{aligned}$$
(13.22)

In this sum, the left terms corresponds to the displacement of the undeformed beam due to the displacement of the node located at \(O_{j}\).

Introducing (13.2013.22) into (13.9) leads to the following equation:

$$\begin{aligned} T_{jl} =1/2\omega _l^2 \cos ^{2}\left( {\omega _l t+\varphi _l } \right) \left( {\left[ {{\varvec{\delta }} \mathbf{{t}}_{j-1}^T \;{\varvec{\delta }} \mathbf{{t}}_j^T } \right] \mathbf{M}_j^{red} \left[ {{\begin{array}{l} {{\varvec{\delta }} \mathbf{{t}}_{j-1} } \\ {{\varvec{\delta }} \mathbf{{t}}_j } \\ \end{array} }} \right] } \right) \end{aligned}$$
(13.23)

where the expressions of each components of matrix \(\mathbf{M}_j^{red} \) are given in [10].

Using these results, the total kinetic energy of the system for the lth node is:

$$\begin{aligned} T_l =\sum _j {T_{jl} } =1/2\omega _l^2 \cos ^{2}\left( {\omega _l t+\varphi _l } \right) {\varvec{\delta }} \mathbf{{t}}^{T}\mathbf{M}_{tot} {\varvec{\delta }} \mathbf{{t}} \end{aligned}$$
(13.24)

with \(\mathbf{M}_{tot} =\mathrm{{diag}}\left( {\mathbf{M}_1^{red} ,\ldots ,\mathbf{M}_n^{red} } \right) \) and \({\varvec{\delta }} \mathbf{{t}}^{T}=\left[ {{\varvec{\delta }} \mathbf{{t}}_0^T ,{\varvec{\delta }} \mathbf{{t}}_1^T ,\ldots ,{\varvec{\delta }} \mathbf{{t}}_{n-1}^T ,{\varvec{\delta }} \mathbf{{t}}_n^T } \right] \)

Then, assuming that the first natural modes of vibrations, i.e. the modes that have the most energy, lead to deformations that are close to the static deformations of the robot under a load applied on the end-effector, the mass matrix can be recomputed into the Cartesian coordinates associated with the tool end-point using the Jacobian matrix \(\mathbf{J}_{\uptheta } \) defined at expression (13.3) (which depend on the robot configuration \(\mathbf{q}\) and computed with respect to virtual joint coordinates \({\varvec{\uptheta }})\) using following expression

$$\begin{aligned} \mathbf{M}_{\mathrm{{C}}} =\mathbf{J}_{\uptheta }^T \mathbf{M}_{\uptheta } \mathbf{J}_{\uptheta } \end{aligned}$$
(13.25)

Thus, using expressions (13.25), it is possible to compute the reduced mass matrix \(\mathbf{M}_{\mathrm{{C}}} \) for a given robot configuration \(\mathbf{q}\). The performances of this model reduction are shown in [10].

Fig. 13.3
figure 3

Fractional cutting force model \(F_{c}(h)\)

4 Machining Process

Let us obtain the model of the cutting force which depends on the relative position of the tool with respect to the workpiece at each instant of machining. As follows from previous works [12], for the known chip thickness h, the cutting force \(F_{c}\) can be expresses as

$$\begin{aligned} F_{c} \left( h \right) =k_0 \frac{h/{h_s }+r\left( {h/{h_s }} \right) ^{2}}{1+h/{h_s }}a_p ,\quad h\ge 0 \end{aligned}$$
(13.26)

where \(a_p \) is a depth of cut, \(r={k_\infty }/{k_0 }<1\) depends on the parameters \(k_{\infty }, k_{0}\) that define the so called stiffness of the cutting process for large and small chip thickness h respectively (Fig. 13.3) and \(h_{s}\) is a specific chip thickness, which depends on the current state of the tool cutting edge. The parameters \(k_{0}, h_{s}\), r are evaluated experimentally for a given combination of tool/working material. To take into account the possible loss of contact between the tool and the workpiece, the above expression should be supplement by the case of \(h<0\) as

$$\begin{aligned} F_c \left( h \right) =0,\;\;\mathrm{{if}}\;\;h<0 \end{aligned}$$
(13.27)

For the multi-edge tool the machining surface is formed by means of several edges simultaneously. The number of working edges varies during machining and depends on the width of cut. For this reason, the total force \(F_{c}\) of such interaction is a superposition of forces \(F_{c,i}\) generated by each tool edge i, which are currently in the contact with the workpiece. Besides, the contact force \(F_{c,i}\) can be decomposed by its radial \(F_{r,i}\) and tangential \(F_{t,i}\) components (Fig. 13.4). In accordance with Merchant’s model [13], the t-component of cutting force \(F_{t,i}\) can be computed with the Eq.  (13.26). The r-component \(F_{r,i}\) is related with \(F_{t,i}\) by following expression [14]

$$\begin{aligned} F_{r,i} =k_r F_{t,i} \end{aligned}$$
(13.28)

where the ratio factor \(k_{r}\) depends on the given tool/workpiece characteristics.

It should be mentioned that in robotic machining it is more suitable to operate with forces expressed in the robot tool frame {x, y, z}. Then, the corresponding components \(F_{x}, F_{y}\) (Fig. 13.4) of the cutting force \(F_{c}\) can be expressed as follows

Fig. 13.4
figure 4

Forces of tool/workpiece interaction

$$\begin{aligned} \begin{array}{l} F_x =\sum \limits _{i=1}^{n_z } {-F_{r,i} \cos \varphi _i } +\sum \limits _{i=1}^{n_z } {F_{t,i} \sin \varphi _i } \\ F_y =\sum \limits _{i=1}^{n_z } {F_{r,i} \sin \varphi _i } +\sum \limits _{i=1}^{n_z } {F_{t,i} \cos \varphi _i } \\ \end{array} \end{aligned}$$
(13.29)

where \(n_{z}\) is the number of currently working cutting edges, \(\varphi _{i}\) is the angular position of the ith cutting edge (the cutting force in z direction \(F_{z}\) is negligible here). So, the vector of external loading of the robot due to the machining process can be composed in the frame {x, y, z} using the defined components \(F_{x}, F_{y}\) as F \(=\) [\(F_{x}, F_{y},0,0,0,0]^{T}\).

Fig. 13.5
figure 5

Meshing of the workpiece area

It should be stressed that the cutting force components \(F_{r,i}\), \(F_{t,i}\) mentioned in Eqs. (13.26), (13.28) are computed for the given chip thickness \(h_{i}\), which should be also evaluated. Let us define model for \(h_{i}\) using mechanical approach. Then the chip thickness \(h_{i}\) removed by ith tooth depends on the angular position \(\varphi _{i}\) of this tooth and it can be evaluated using to the geometrical distance between the position of the given tooth i and the current machining profile (Fig. 13.4). It should be mentioned, that the main issue here is to follow the current relative position between the ith tooth and the working material or to define whether the ith tooth is involved in cutting for given instant of process. Because of the robot dynamic behavior and the regenerative mechanism of surface formation [15] this problem cannot be solved directly using kinematic relations. In this case it is reasonable to introduce a special rectangular grid, which decomposes the workpiece area into segments and allows tracking the tool/workpiece interaction and the formation of the machining profile (Fig. 13.5).

Here, Steps \(\Delta s_{x}, \Delta s_{y}\) between grid nodes are constant and depend on the tool geometry, cutting condition and time discretization \(\Delta \tau \). Each node j (\(j=\overline{1,N_w } , N_{w}\) is the number of nodes) of the grid can be marked as “1” or “0”: “1” corresponds to nodes situated in the workpiece area with material (rose nodes in Fig. 13.6), “0” corresponds to nodes situated in workpiece area that was cut away (white nodes in Fig. 13.6).

Fig. 13.6
figure 6

Evaluating the tool/workpiece intersection \(\mathrm{A}_{i}\) and computing the corresponding chip thickness \(h_{i}\)

In order to define the number of currently cut nodes by the ith tooth, the previous instant of machining process should be considered. Let us define \(A_{i}\) as an amount of working material that is currently cut away by the ith tooth (Fig. 13.6). So, if node j marked as “1” is located inside the marked sector (green nodes in Fig. 13.6), it changes to “0” and \(A_{i}\) is increasing by \(\Delta s_x \Delta s_y \). Analyzing all potential nodes and computing \(A_{i}\), the chip thickness \(h_{i}\), removed at given instant of the process by the ith tooth, can be estimated by \(h_i ={A_i }/{R\Delta \alpha _i }, \quad i=\overline{1,N} _z \). The angle \(\Delta \varphi _{i}\) determines the current angular position of the ith tooth regarding to its position at the instant \(\tau -\Delta \tau \) and referred to the position of TCP at \(\tau -\Delta \tau \).

Fig. 13.7
figure 7

Algorithm for numerical simulation of robotic machining process dynamics

Described mechanism of chip formation and the machining force model (13.26) allow computing the dynamic behavior of the robotic machining process where models of robot inertia and stiffness are discussed in the Sect. 13.3 of the chapter. The detailed algorithm that is used in numerical analysis is presented in Fig. 13.7, where the analysis of the robot dynamics is performed in the tool frame with respect to the dynamic displacement of the tool \(\delta t_{dyn}\) fixed on the robot end-effector around its position on the trajectory.

5 Compliance Error Compensation Technique

In industrial robotic controllers, the manipulator motions are usually generated using the inverse kinematic model that allows us to compute the input signals for actuators \({\varvec{\uprho }}_0 \) corresponding to the desired end-effector location \(\mathbf{t}_0 \), which is assigned assuming that the compliance errors are negligible. However, if the external loading \(\mathbf{F}\) is essential, the kinematic control becomes non-applicable because of changes in the end-effector location. It can be computed from the non-linear compliance model as

$$\begin{aligned} \mathbf{t}_\mathrm{{F}} =f^{-1}\left( {\mathbf{F}\;|\;\mathbf{t}_0 } \right) \end{aligned}$$
(13.30)

where the subscripts ‘F’ and ‘0’ refer to the loaded and unloaded modes respectively, and ‘\(|\)’ separates arguments and parameters of the function \(f\left( \right) \). Some details concerning this function are given in our previous publication [7].

To compensate this undeterred end-effector displacement from \(\mathbf{t}_0 \) to \(\mathbf{t}_\mathrm{{F}}\), the target point should be modified in such a way that, under the loading \(\mathbf{F}\), the end-platform is located in the desired point \(\mathbf{t}_0 \). This requirement can be expressed using the stiffness model in the following way

$$\begin{aligned} \mathbf{F}=f\left( {\mathbf{t}_0 \;|\;\mathbf{t}_\mathrm{{0}}^{\mathrm{{(F)}}} } \right) \end{aligned}$$
(13.31)

where \(\mathbf{t}_\mathrm{{0}}^{\mathrm{{(F)}}} \) denotes the modified target location. Hence, the problem is reduced to the solution of the nonlinear Eq. (13.31) for \(\mathbf{t}_\mathrm{{0}}^{\mathrm{{(F)}}} \), while \(\mathbf{F}\) and \(\mathbf{t}_0 \) are assumed to be given. It is worth mentioning that this equation completely differs from the equation \(\mathbf{F}=f(\mathbf{t}\;|\;\mathbf{t}_0 )\), where the unknown variable is \(\mathbf{t}\). It means that here the compliance model does not allow us to compute the modified target point \(\mathbf{t}_\mathrm{{0}}^{\mathrm{{(F)}}} \) straightforwardly, while the linear compensation technique directly operates with Cartesian compliance matrix [16].

To solve Eq. (13.31) for \(\mathbf{t}_\mathrm{{0}}^{\mathrm{{(F)}}}\), similar numerical technique can be applied. It yields the following iterative scheme

$$\begin{aligned} \mathbf{t}_\mathrm{{0}}^{{\mathrm{{(F)}}}^{\prime }}=\mathbf{t}_\mathrm{{0}}^{\mathrm{{(F)}}} +\alpha \cdot \left( {\mathbf{t}_0 -f^{-1}(\mathbf{F}\;|\;\mathbf{t}_\mathrm{{0}}^{\mathrm{{(F)}}} )} \right) \end{aligned}$$
(13.32)

where the prime corresponds to the next iteration, \(\alpha \in (0,1)\) is the scalar parameter ensuring the convergence. More detailed presentation of the developed iterative routines is given in Fig. 13.8.

Fig. 13.8
figure 8

Procedure for compensation of compliance errors

Hence, using the proposed computational techniques, it is possible to compensate a main part compliance errors by proper adjusting the reference trajectory that is used as an input for robotic controller. In this case, the control is based on the inverse kinetostatic model (instead of kinematic one) that takes into account both the manipulator geometry and elastic properties of its links and joints. Implementation of developed compliance error compensation technique presented in Fig. 13.9.

Fig. 13.9
figure 9

Implementation of compliance error compensation technique

6 Experimental Verification

The developed compliance error compensation technique has been verified experimentally for robotic milling with the KUKA KR270 robot along a simple trajectory in aluminum workpiece. It is assumed that at the beginning of the technological process the robot is in the configuration \(\mathbf{q}\) (see Table 13.1, Fig. 13.10). The parameters of the stiffness model for the considered robot have been identified in [17] and are presented in Table 13.1. Link masses required for the mass matrix of the robot are presented also in Table 13.1.

Table 13.1 Initial data for robotic-based milling

For the milling, the cutter with the external diameter D  \(=\)  20 mm and four teeth (\(N_{z}=4\)) distributed uniformly over the tool is used. For the given combination of the tool and the workpiece material the following parameters correspond to the cutting force model defined in (13.26): \(k_{0}=5\times 10^{6}\, \mathrm{N/m}, h_{s}=1.8\times 10^{-5}\, \mathrm{m}, r=0.1, k_{r}=0.3\).

Fig. 13.10
figure 10

Starting pose of the KUKA KR270 robot to perform the operation of milling

Fig. 13.11
figure 11

Starting relative position of the tool with respect to the workpiece

Fig. 13.12
figure 12

Variation of machining force components \(F_{x}\) (a) and \(F_{y}\) (b) for whole milling process

Fig. 13.13
figure 13

Evolution of the tool dynamic displacement \(\delta t_{dyn}\) that is composed from \(x_{TCP}\) and \(y_{TCP}\) components

Fig. 13.14
figure 14

Modified trajectory \(f_{y}\) and corresponding feed rate \(v_{fy}\) in y-direction, computed based on the original dynamic displacement of the tool \(\delta t_{dyn}\)

Taking into account that the workpiece has a straight borders let us assume that at the instant \(t=0\) one of the teeth of the tool is in contact with the workpiece material as it is shown in the Fig. 13.11. It is also assumed that the machining process is performing with the constant feed rate \(v_{f}=4\) m/min (applied in x-direction of the robot tool frame) and the constant spindle rotation \(\Omega =8000\) rpm along the straight line of 80 mm. Experimental verification and numerical simulation of the described case of the milling process with KUKA KR-270 robot using the algorithm shown in Fig. 13.7 allows us to trace the evolution of machining force x, y-components for the whole process (Fig. 13.12). The corresponding dynamic displacement of the tool around its current position on the trajectory is shown in Fig. 13.13.

In accordance with the obtained results the system robot/machining process realize complex vibratory motion. The high frequency component of this motion (about 700 Hz, Fig. 13.12) is related to the spindle rotation and the number of tool teeth \( N_{z}\). In certain cases such behavior can excites the dynamics of the robot (natural modes) but this study remains out the frame of the presented chapter. On the contrary, the low frequency component of robot/tool motion (about 7 Hz, Fig. 13.13), especially in the y-direction (that is perpendicular to the applied feed) influences directly the quality of final product. Such motion is related to the robot compliance and it can be compensated using the error compensation technique described in the chapter. Hence, let us form the modified trajectory based on the dynamic displacement of the robot end-effector in the y-direction (Fig. 13.14).

It should be stressed that the time step between referenced points of this modified trajectory is limited with the characteristics of the controller used in the robot (in the presented case this step is chosen 0.05 s). The corresponding feed rate \(v_{fy }\) for the modified trajectory has been computed. So, this new data (feed \( f_{y}\) and feed rate \(v_{fy})\) with the data defined in the beginning of this section allow us to compensate the trajectory error during machining caused by the robot compliance. The resulted compensated trajectory in the y-direction (in time domain) is presented in Fig. 13.15.

Fig. 13.15
figure 15

Evolution of the dynamic displacement obtained after involving the error compensation technique into the analysis of robotic milling process

It should be noted that the part of the trajectory while machining tool is engaging into the workpiece does not have effect on the quality of final product (surface). During this stage the contact area between the tool and the workpiece is increasing progressively. Hence, at each instant of processing the cutter corrects the machining profile and eliminates trajectory errors produced during all previous instants. On the contrary, during the stage of machining with the fully engaged tool the trajectory in x, y-directions define directly the final machining profile and this part of trajectory is analyzed here (Fig. 13.15). Comparison results presented in Figs. 13.13, 13.15 are summarized in Table 13.2. So after applying error compensation technique the static deviation in y direction has been reduced from 0.058 to 0.00014 mm (99.8 %). Maximum defilation in the machining profile has been reduced from 0.063 to 0.0047 mm (92.6 %). Low frequency remained the same for both cases.

Table 13.2 Milling trajectory accuracy before and after compliance error compensation

Hence, obtained results show that the developed compliance error compensation allows us significantly increase the accuracy of the robotic-based machining.

7 Conclusions

In robotic-based machining, an interaction between the workpiece and technological tool causes essential deflections that significantly decrease the manufacturing accuracy. Relevant compliance errors highly depend on the manipulator configuration and essentially differ throughout the workspace. Their influence is especially important for heavy serial robots. To overcome this difficulty this chapter presents a new technique for compensation of the compliance errors caused by technological process. In contrast to previous works, this technique is based on the non-linear stiffness model and the reduced elasto-dynamic model of the robotic based milling process.

The advantages and practical significance of the proposed approach are illustrated by milling with of KUKA KR270. It is shown that after error compensation technique significantly increase the accuracy of milling. In future the proposed technique will be integrated in a software toolbox.