1 Introduction

Industrial robots have major advantages over machine tools in terms of flexibility and workspace. The flexibility of industrial robots is expressed both in the accessibility of orientations of the TCP in the workspace as well as the ability to perform a wide variety of manufacturing processes. Also the capital costs for industrial robots are up to three times lower than the costs of a machine tool [1]. Therefore industrial robots are more and more treated as an alternative to machine tools.

However industrial robots have lower working accuracy compared to machine tools because they are less rigid [2]. Compared to a machine tool the absolute accuracy of an industrial robot can be between 20 to 50 times lower especially under changing process forces [1]. The lower accuracy results mainly from geometric erros and a low stiffness. Therefore industrial robots are suitable for tasks where the expected forces and the expected accuracy are low [3]. To compensate or minimize the main geometric errors that result from manufacturing and assembly of the industrial robot a producer specific calibration is carried out and deposited in the control of the robot before the robot is shipped [4]. Therefore, after compensating the geometric erros, the low stiffness of the robot is the main reason of the low accuracy. The research on stiffness improvement mainly concentrates on three aspects: stiffness compensation, posture optimization and robot structure optimization [5]. The low static stiffness, that has been identified in several works [6, 7] as the significant error influencing the working accuracy of the industrial robot especially under process forces, is mainly caused by the used gears and their low rigidity. The influence of the low rigidity of the gears outweighs the deformation of the structure and the tilting rigidity of the bearings [6]. This results in a pose dependence of the stiffness of the industrial robot [7]. There are different approaches to compensate this stiffness behavior such as constructive changes in the robotic structure that comes with reduced mobility and flexibility of the robot. Another approach is to model and predict the compliance behavior of the industrial robot under measured or predicted process forces and compensate the deviation with offline or online compensation [1].

The effects of the compliance behavior of the industrial robot especially under process forces has been examined and modeled for example by [1, 7, 8]. The models are based on the forward transformation that is extended with the elastic deformation of the joints [8]. In this modeling approach the elastic structures are modeled by rigid bodies connected by virtual elastic joints. These virtual joints are then implemented in the forward transformation [1]. The level of complexity of these models differs depending on whether only the torsional rigidity is considerated or also the tilting rigidity of the structure [1].

Since the deviation of the TCP mainly results from the limited torsional stiffness of the gears often only the torsional rigidity is implemented and the links are considered to be almost stiff [4]. For the forward transformation the kinematic description of the robot is necessary, to describe the pose-dependent compliance of the robot the stiffness parameters of the gears are necessary. To define the robot specific stiffness parameters, mostly complex setups were used for example in [1] the stiffness parameters were determined by applying observable cubes to the robot structure. By determining the displacement of the cube while a defined test force was applied on the TCP the compliance was calculated. To apply the force a cable pull system was used and, to measure the determination of the parts of the robot, a laser tracker was used. This example shows that the determination of the stiffness parameters is time and resource consuming.

Cordes [6] used a less resource consuming approach by measuring the global compliance of the robot structure. In twelve different positions a defined force was applied on the TCP and the shift of the TCP was measured by cost intensive metrology. By combining the measurements and minimizing the sum of squared residuals of the over-determined system the parameters were determined.

In this paper a more cost and time efficient approach is implemented which is based on optimal design of experiments for variance-minimal Bayesian inference of the gear stiffness parameters. The experimental setup consists of the angular poses of the robot’s axes and the direction as well as the magnitude of the force which is applied on the TCP. In the experiments the quantity of interest is the deviation of the TCP which is measured by laser triangulation sensors. Since the measurement process is subject to aleatoric and epistemic uncertainty [9, 10] so are the estimated parameters. The experimental setup is optimized so that the uncertainty of the estimated stiffness parameters which is measured by a scalar function of the covariance matrix becomes minimal. In the second step measurement data is collected within the optimized experiment and infer the compliance parameters in a Bayesian setting [11]. The prior is chosen from previous estimations in [6] and enters the estimation process.

Optimal design of experiments is a broad field of research and describes an experimental design that is optimal regarding statistical criterion [12,13,14,15,16]. In general, the literature can be classified into topics concerning optimal sensor placement [15, 17,18,19] and optimal choice of inputs [16, 20,21,22,23,24]. In this case the sensors which observe the movement of the TCP are fixed but the angular poses of the axes and the applied force can be varied. Then it is refered to these conditions as the inputs from now on.

This paper is structured as follows. In Sect. 2 the compliance model is described in full detail. In Sect. 3 the approach to optimal design of experiments for Bayesian inference of the gear compliance parameters is presented. The experimental setup is presented in Sect. 4 and the numerical results are shown in Sect. 5 before a conclusion is given in Sect. 6.

2 Compliance model

The aim of the compliance model is to calculate the deviation of the industrial robot caused by process forces [6]. To describe the translational deviation in the cartesian space the elastastic behavior of the gears are combined with the forward transformation. The forward tranformation is the foundation of the model and describes the position and orientation of the TCP in the cartesian space based on the joint angles \({{\,\mathrm{{\boldsymbol{\theta }}}\,}}_{i}\) [8]. To set up the model, on each joint of the robot a coordinate system is equipped as shown in Fig. 1. The relation between the coordinate systems and therefore the robot parts are described by tranformation matrices according to the Denavit Hartenberg convention [25]. For the complicance model this tranformation has to be changed so that the transformation ends with the rotation around the Z axis [25]. The transformation from one coordinate system to another is based on rotation and translation parameters.The rotation parameters are \(\alpha _{i}\) which describes the rotation around the X axis and \({\tilde{\theta }}_{i}\) which describes the rotation around the Z axis. The translation prameters are \(a_{i}\) which describes the translation in X translation and \(d_{i}\) for the Z translation [1] which yield the forward transformation

$$\begin{aligned} \begin{aligned} {\boldsymbol{T}}_{{\boldsymbol{i}}}&={\boldsymbol{T}}_{{\boldsymbol{R}}}(\alpha _{i}) \cdot {\boldsymbol{T}}_{{\boldsymbol{T}}}(a_{i}) \cdot {\boldsymbol{T}}_{{\boldsymbol{R}}}(\theta _{i}) \cdot {\boldsymbol{T}}_{{\boldsymbol{T}}}(d_{i}) \\&=\begin{bmatrix} \cos ({\tilde{\theta }}_{i}) &{} -\sin ({\tilde{\theta }}_{i}) &{} 0&{} a_{i} \\ \sin ({\tilde{\theta }}_{i}) \cos (\alpha _{i}) &{} \cos ({\tilde{\theta }}_{i})\cos (\alpha _{i}) &{} -\sin (\alpha _{i}) &{}-\sin (\alpha _{i})d_{i} \\ \sin ({\tilde{\theta }}_{i})\sin (\alpha _{i})&{}\cos ({\tilde{\theta }}_{i}) \sin (\alpha _{i})&{} \cos (\alpha _{i})&{}\cos (\alpha _{i})d{i} \\ 0&{}0&{}0&{}1 \end{bmatrix}. \end{aligned} \end{aligned}$$
(1)

The rotation \({\tilde{\theta }}_{i}\) includes the joint angle \(\theta _{i}\) [25].

Fig. 1
figure 1

Kinematic model and coordinate systems of the ABB IRB 6660/205

In this approach it is assumed that the links of the robot are rigid and the joints are elastic in direction of rotation with high radial stiffness behavior. Therefore the deformation of the gears is modeled with the behavior of linear elastic torsional springs [4]. To describe the deviation of the robot the linear elastic behaviour of the gears is used to extend the forward transformation by an additional transformation that is based on the joint stiffness as in [8] described.

$$\begin{aligned} \begin{aligned} {\boldsymbol{T}}_{{\boldsymbol{TCP}}}={\boldsymbol{T}}_{{\boldsymbol{i}}} \cdot {\boldsymbol{T}}_{{\boldsymbol{R}}}(\Delta \theta _{i}) \\ \end{aligned} \end{aligned}$$
(2)

The rotational part of the matrix describes the deformation of the virtual joint due to a measured force at the TCP with the angle \(\Delta \theta\) that describes the torsion around the Z axis of the gear due to the force at the TCP [1]. To calculate \(\Delta \theta\) the equation for linear torsion springs is used

$$\begin{aligned} \Delta \theta _{i} = \frac{M_{i}}{k_{i}} \end{aligned}$$
(3)

where \(M_{i}\) represents the torque that is caused by the cutting forces and \(k_{i}\) the stiffness parameters of the joints. The torques can be calculated by building the cross product of the vector processing forces \(\vec{{\boldsymbol{F}}}\) and the transformation matrix towards the specific coordinates systems of the axis \(\vec{{\boldsymbol{T}}}_{{\boldsymbol{i}}}\). For this the forces engaging at the TCP \(\vec{{\boldsymbol{F}}}_{{\boldsymbol{TCP}}}\) have to be transformed into the joint coordinate system with

$$\begin{aligned} \vec{{\boldsymbol{F}}}_{{\boldsymbol{i}}} = \vec{{\boldsymbol{R}}}_{{\boldsymbol{i}}}\cdot \vec{{\boldsymbol{F}}}_{{\boldsymbol{TCP}}} \end{aligned}$$
(4)

so that

$$\begin{aligned} \vec{{\boldsymbol{M}}}_{{\boldsymbol{i}}} = \vec{{\boldsymbol{T}}}_{{\boldsymbol{i}}}\times \vec{{\boldsymbol{F}}}_{{\boldsymbol{i}}} \end{aligned}$$
(5)

For the stiffness parameters \(k_{i}\) it is assumed that the joint behavior is linear and therefore the stiffness parameters are assumed to be fixed parameters [6]. With \({\boldsymbol{T}}_{{\boldsymbol{R}}}(\Delta \theta _{i})\) an additional tranformation matrix with rotation around Z axis is implemented in the forward transformation. The conventional forward kinematics provide the unloaded TCP position \(\vec{{\boldsymbol{TCP}}}_{{\boldsymbol{ideal}}}\), the extended forward transformation the TCP position under process forces \(\vec{{\boldsymbol{TCP}}}_{{\boldsymbol{F}}}\) [25]. The force-induced deviation can be calculated with

$$\begin{aligned} {\boldsymbol{\Delta }}\vec{{\boldsymbol{TCP}}} = \vec{{\boldsymbol{TCP}}}_{{\boldsymbol{F}}}-\vec{{\boldsymbol{TCP}}}_{{\boldsymbol{ideal}}} \end{aligned}$$
(6)

The advantage of this analytic description of the deviation is the fast calculation time compared to simulations [25].

For this work the six-axis heavy duty robot ABB IRB 6660-205/1.9 is used. It is build for milling processes with a closed-loop mechanism in form of a parallelogram which can be seen in Fig. 1. This causes a coupling between the joint angles \(\theta _{2}\) and \(\theta _{3}\) which is described in the model as

$$\begin{aligned} {\tilde{\theta }}_{3} =\theta _{3} - \theta _{2} \end{aligned}$$
(7)

To implement the model for this robot the parameters \(\alpha _{i}, a_{i}, d_{i}\) and \(k_{i}\) have to be determinded. While the parameter \(\alpha _{i}, a_{i}, d_{i}\) can be extracted from the documentation of the robot or through measurements of the robot structure [26], the stiffness parameters have to be determined in experiments. To determine the stiffness parameters an optimal design of experiments approach for Bayesian inference is used.

3 Bayesian inference and optimal design of experiments

In optimal design of experiments the best experimental setup is chosen such that the desired parameters in this setting the stiffness parameters can be estimated from data with minimal variance. In this setting, the orientations of the robot joint angles \({{\,\mathrm{{\boldsymbol{\theta }}}\,}}\) and the direction and magnitude of the force \({{\,\mathrm{{\boldsymbol{f}}}\,}}\) are optimized such that the uncertainty in the estimated stiffness parameters \({{\,\mathrm{{\boldsymbol{k}}}\,}}\) becomes minimal. The input variables \({{\,\mathrm{{\boldsymbol{u}}}\,}}:=({{\,\mathrm{{\boldsymbol{\theta }}}\,}}, {{\,\mathrm{{\boldsymbol{f}}}\,}})\) are introduced and used from now on. First the Bayesian framework is described and then the optimal design of experiments approach.

The compliance model \({{\,\mathrm{{\boldsymbol{\eta }}}\,}}({{\,\mathrm{{\boldsymbol{k}}}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}, {{\,\mathrm{{\boldsymbol{\beta }}}\,}})\) maps the parameters \({{\,\mathrm{{\boldsymbol{k}}}\,}}\), the inputs \({{\,\mathrm{{\boldsymbol{u}}}\,}}\) and some constants \({{\,\mathrm{{\boldsymbol{\beta }}}\,}}\) to the three-dimensional deviation of the TCP. This is the quantity of interest in the experiments which are measured via lasers. The compliance model \({{\,\mathrm{{\boldsymbol{\eta }}}\,}}\) serves as a computer model which needs to be calibrated and validated. From a probabilistic point of view the data \({{\,\mathrm{{\boldsymbol{z}}}\,}}\) is assumed to be a realization of a random variable \({{\,\mathrm{{\boldsymbol{Z}}}\,}}\) with a specified distribution. It is assumed here that the data is subject to Gaussian observational noise:

$$\begin{aligned} {{\,\mathrm{{\boldsymbol{Z}}}\,}}= {{\,\mathrm{{\boldsymbol{z}}}\,}}^\star + {{\,\mathrm{{\boldsymbol{\mathcal {E}}}}\,}}, \quad {{\,\mathrm{{\boldsymbol{\mathcal {E}}}}\,}}\sim {{\,\mathrm{\mathscr {N}}\,}}(0, {{\,\mathrm{{\boldsymbol{\varSigma }}}\,}}), \end{aligned}$$
(8)

where \({{\,\mathrm{{\boldsymbol{z}}}\,}}^\star\) is the true but unknown quantity of interest. If this model is correct than it describes the data well for all inputs \({{\,\mathrm{{\boldsymbol{u}}}\,}}\) from an admissible domain \({{\,\mathrm{\textit{U}_{\textrm{ad}}}\,}}\):

$$\begin{aligned} {{\,\mathrm{{\boldsymbol{Z}}}\,}}= {{\,\mathrm{{\boldsymbol{\eta }}}\,}}({{\,\mathrm{{\boldsymbol{k}}}\,}}^\star , {{\,\mathrm{{\boldsymbol{u}}}\,}}, {{\,\mathrm{{\boldsymbol{\beta }}}\,}}) + {{\,\mathrm{{\boldsymbol{\mathcal {E}}}}\,}}, \quad {{\,\mathrm{{\boldsymbol{\mathcal {E}}}}\,}}\sim {{\,\mathrm{\mathscr {N}}\,}}(0, {{\,\mathrm{{\boldsymbol{\varSigma }}}\,}}), \end{aligned}$$
(9)

where \({{\,\mathrm{{\boldsymbol{k}}}\,}}^\star\) are the true but unknown stiffness parameters. The aim is to find a good approximation \(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}\) of \({{\,\mathrm{{\boldsymbol{k}}}\,}}^\star\) from a Bayesian inference approach. For a given realization \({{\,\mathrm{{\boldsymbol{z}}}\,}}\) of the data \({{\,\mathrm{{\boldsymbol{Z}}}\,}}\) and for a given realization \({{\,\mathrm{{\boldsymbol{\varepsilon }}}\,}}\) of the noise \({{\,\mathrm{{\boldsymbol{\mathcal {E}}}}\,}}\) it is required that

$$\begin{aligned} {{\,\mathrm{{\boldsymbol{z}}}\,}}= {{\,\mathrm{{\boldsymbol{\eta }}}\,}}(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}, {{\,\mathrm{{\boldsymbol{\beta }}}\,}}) + {{\,\mathrm{{\boldsymbol{\varepsilon }}}\,}}. \end{aligned}$$
(10)

Within a Bayesian approach, the estimated parameters have a posterior probability distribution \(\pi ({{\,\mathrm{{\boldsymbol{k}}}\,}}\Vert {{\,\mathrm{{\boldsymbol{z}}}\,}})\) that is derived from the data likelihood \(\pi ({{\,\mathrm{{\boldsymbol{z}}}\,}}\Vert {{\,\mathrm{{\boldsymbol{k}}}\,}})\) and the prior probability distribution \(\pi _0\) via the Bayes formula. Let \(\pi _0 \in {{\,\mathrm{\mathscr {N}}\,}}({{\,\mathrm{{\boldsymbol{k}}_0}\,}}, {{\,\mathrm{{\boldsymbol{\Gamma }_0}}\,}}/ \gamma )\) be a Gaussian prior, where \(\gamma > 0\). Moreover, let \(\rho (\cdot )\) be the density function of the noise random variable \({{\,\mathrm{{\boldsymbol{\mathcal {E}}}}\,}}\). In view of Eq. (9), the data likelihood \(\pi ({{\,\mathrm{{\boldsymbol{z}}}\,}}\Vert {{\,\mathrm{{\boldsymbol{k}}}\,}})\) has the density function \({{\,\mathrm{{\boldsymbol{z}}}\,}}\mapsto \rho ({{\,\mathrm{{\boldsymbol{z}}}\,}}- {{\,\mathrm{{\boldsymbol{\eta }}}\,}}({{\,\mathrm{{\boldsymbol{k}}}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}, {{\,\mathrm{{\boldsymbol{\beta }}}\,}}))\). Then the posterior \(\pi ({{\,\mathrm{{\boldsymbol{k}}}\,}}\Vert {{\,\mathrm{{\boldsymbol{z}}}\,}})\) is given by

$$\begin{aligned} \begin{aligned} \pi ({{\,\mathrm{{\boldsymbol{k}}}\,}}\Vert {{\,\mathrm{{\boldsymbol{z}}}\,}})&= C \pi ({{\,\mathrm{{\boldsymbol{z}}}\,}}\Vert {{\,\mathrm{{\boldsymbol{k}}}\,}}) \pi _0 \\&= C \textrm{exp} \!\left( -\dfrac{1}{2} \left\| {{\,\mathrm{{\boldsymbol{z}}}\,}}- {{\,\mathrm{{\boldsymbol{\eta }}}\,}}({{\,\mathrm{{\boldsymbol{k}}}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}, {{\,\mathrm{{\boldsymbol{\beta }}}\,}})\right\| _{{{\,\mathrm{{\boldsymbol{\varSigma }}}\,}}^{-1}}^2 -\dfrac{\gamma }{2} \left\| {{\,\mathrm{{\boldsymbol{k}}}\,}}- {{\,\mathrm{{\boldsymbol{k}}_0}\,}}\right\| _{{{\,\mathrm{{\boldsymbol{\Gamma }_0}^{\,-1}}\,}}}^2\right) \!, \end{aligned} \end{aligned}$$
(11)

where C is a normalization constant and \(\left\| {\boldsymbol{x}}\right\| _{{\boldsymbol{B}}} :=\sqrt{{\boldsymbol{x}}^\top {\boldsymbol{B}} {\boldsymbol{x}}}\) is the weighted norm of a vector \({\boldsymbol{x}}\) with a compatible matrix \({\boldsymbol{B}}\). The maximum a posteriori estimator (MAP) is defined to be a point \(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}\) that maximizes the posterior:

$$\begin{aligned} \overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}:=\underset{{{\,\mathrm{{\boldsymbol{k}}}\,}}}{\textrm{argmin}} \; \!\left( \dfrac{1}{2} \left\| {{\,\mathrm{{\boldsymbol{z}}}\,}}- {{\,\mathrm{{\boldsymbol{\eta }}}\,}}({{\,\mathrm{{\boldsymbol{k}}}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}, {{\,\mathrm{{\boldsymbol{\beta }}}\,}})\right\| _{{{\,\mathrm{{\boldsymbol{\varSigma }}}\,}}^{-1}}^2 +\dfrac{\gamma }{2} \left\| {{\,\mathrm{{\boldsymbol{k}}}\,}}- {{\,\mathrm{{\boldsymbol{k}}_0}\,}}\right\| _{{{\,\mathrm{{\boldsymbol{\Gamma }_0}^{\,-1}}\,}}}^2\right) \!, \end{aligned}$$
(12)

compare [11]. It is evident that the estimated parameters depend on the inputs \({{\,\mathrm{{\boldsymbol{u}}}\,}}\) and the data \({{\,\mathrm{{\boldsymbol{z}}}\,}}\), i.e., \(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}= \overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}({{\,\mathrm{{\boldsymbol{u}}}\,}}, {{\,\mathrm{{\boldsymbol{z}}}\,}})\).

The compliance model \({{\,\mathrm{{\boldsymbol{\eta }}}\,}}\) is nonlinear in \({{\,\mathrm{{\boldsymbol{k}}}\,}}\). Thus, the posterior is not Gaussian. However, the model is linearized at the MAP point \(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}\) to obtain Gaussian posterior probability distributions. In the linearized case the posterior covariance matrix is computed [15]:

$$\begin{aligned} {{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}\big (\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}\big ) = \!\left( {\boldsymbol{J}}(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}, {{\,\mathrm{{\boldsymbol{u}}}\,}})^\top {{\,\mathrm{{\boldsymbol{\varSigma }}}\,}}^{-1} {\boldsymbol{J}}(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}) + \gamma {{\,\mathrm{{\boldsymbol{\Gamma }_0}^{\,-1}}\,}}\right) ^{\!-1}\!, \end{aligned}$$
(13)

where \({\boldsymbol{J}}(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}, {{\,\mathrm{{\boldsymbol{u}}}\,}})\) is the sensitivity matrix of the model with respect to the parameters:

$$\begin{aligned} {\boldsymbol{J}}(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}) = \left. \dfrac{\partial \! {{\,\mathrm{{\boldsymbol{\eta }}}\,}}({{\,\mathrm{{\boldsymbol{k}}}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}, {{\,\mathrm{{\boldsymbol{\beta }}}\,}})}{\partial \! {{\,\mathrm{{\boldsymbol{k}}}\,}}} \right\| _{{{\,\mathrm{{\boldsymbol{k}}}\,}}= \overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}}. \end{aligned}$$
(14)

Let \(1 - \alpha\), where \(\alpha \in (0,1)\), be a confidence level. Then the confidence region \(G(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}, {{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}, \alpha )\) around the MAP point \(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}\) is an \(n_\textrm{k}\)-dimensional ellipsoid:

$$\begin{aligned} G \big (\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}, {{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}, \alpha \big ) :=\left\{ {{\,\mathrm{{\boldsymbol{k}}}\,}}\in {{\,\mathrm{\mathbb {R}}\,}}^{n_\textrm{k}}: ({{\,\mathrm{{\boldsymbol{k}}}\,}}- \overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}})^\top {{\,\mathrm{{\boldsymbol{C}}_\textrm{post}^{\,-1}}\,}}({{\,\mathrm{{\boldsymbol{k}}}\,}}- \overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}) \le \chi ^2_{n_\textrm{k}}(1 - \alpha )\right\} , \end{aligned}$$
(15)

where \(\chi ^2_{n_\textrm{k}}(1 - \alpha )\) is the quantile of the chi-squared distribution with \(n_\textrm{k}\) degrees of freedom, see [12, 16].

Optimal design of experiments aims at minimizing the posterior covariance matrix \({{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}\). In order to avoid ill-posed optimization problems [12], one minimizes a scalar design function \(\Psi (\cdot )\) of the covariance instead. The following design criteria are frequently used [13]:

$$\begin{aligned} \begin{aligned} \Psi _\textrm{A}({{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}) = \textrm{trace}({{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}), \\ \Psi _\textrm{D}({{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}) = \det ({{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}), \\ \Psi _\textrm{E}({{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}) = \lambda _\textrm{max}({{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}). \end{aligned} \end{aligned}$$
(16)

In this paper, \(\Psi (\cdot ) = \Psi _\textrm{A}(\cdot )\) is chosen, i.e., the trace of the posterior covariance matrix is computed. In order to reduce the complexity of the problem and since the measurement data \({{\,\mathrm{{\boldsymbol{z}}}\,}}\) is not available at this point \(\overline{{{\,\mathrm{{\boldsymbol{k}}}\,}}}({{\,\mathrm{{\boldsymbol{u}}}\,}}, {{\,\mathrm{{\boldsymbol{z}}}\,}}) \approx {{\,\mathrm{{\boldsymbol{k}}_0}\,}}\) is fixed. Thus, to minimize the trace of the covariance matrix

$$\begin{aligned} {{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}\big ({{\,\mathrm{{\boldsymbol{k}}_0}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}\big ) = \!\left( {\boldsymbol{J}}({{\,\mathrm{{\boldsymbol{k}}_0}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}})^\top {{\,\mathrm{{\boldsymbol{\varSigma }}}\,}}^{-1} {\boldsymbol{J}}({{\,\mathrm{{\boldsymbol{k}}_0}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}}) + \gamma {{\,\mathrm{{\boldsymbol{\Gamma }_0}^{\,-1}}\,}}\right) ^{\!-1}\!. \end{aligned}$$
(17)

The following constrained optimization problem arrises:

$$\begin{aligned} \begin{aligned} \underset{{{\,\mathrm{{\boldsymbol{u}}}\,}}}{\min }\ \;\;&\Psi _\textrm{A}[{{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}({{\,\mathrm{{\boldsymbol{k}}_0}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}})] \\ \mathrm {s.t.} \;\;&{{\,\mathrm{{\boldsymbol{u}}}\,}}\in {{\,\mathrm{\textit{U}_{\textrm{ad}}}\,}}. \end{aligned} \end{aligned}$$
(18)

In our setting the set of admissible inputs \({{\,\mathrm{\textit{U}_{\textrm{ad}}}\,}}\) is determined in the following way:

$$\begin{aligned} {{\,\mathrm{\textit{U}_{\textrm{ad}}}\,}}:=\left\{ {{\,\mathrm{{\boldsymbol{u}}}\,}}: \; {{\,\mathrm{{\boldsymbol{u}}}\,}}_\textrm{min} \le {{\,\mathrm{{\boldsymbol{u}}}\,}}\le {{\,\mathrm{{\boldsymbol{u}}}\,}}_\textrm{max},\, {\boldsymbol{g}}({{\,\mathrm{{\boldsymbol{u}}}\,}}) \le 0,\, {\boldsymbol{h}}({{\,\mathrm{{\boldsymbol{u}}}\,}}) = 0\right\} . \end{aligned}$$
(19)

The first condition states that the joint angles and the components of the force vector have to lie within a minimum \({{\,\mathrm{{\boldsymbol{u}}}\,}}_\textrm{min}\) and a maximum \({{\,\mathrm{{\boldsymbol{u}}}\,}}_\textrm{max}\) range. The ranges are defined in Sect. 4. The second condition states that the orientation of the TCP is within a range that can be reached by the robot and is suitable for milling processes. Note, that the functions \({\boldsymbol{g}}\) and \({\boldsymbol{h}}\) are nonlinear.

Thus the problem (18) is restated more explicitly:

$$\begin{aligned} \begin{aligned} \underset{{{\,\mathrm{{\boldsymbol{u}}}\,}}}{\min }\ \;\;&\Psi _\textrm{A}[{{\,\mathrm{{\boldsymbol{C}}_\textrm{post}}\,}}({{\,\mathrm{{\boldsymbol{k}}_0}\,}}, {{\,\mathrm{{\boldsymbol{u}}}\,}})] \\ \mathrm {s.t.} \;\;&{{\,\mathrm{{\boldsymbol{u}}}\,}}_\textrm{min} \le {{\,\mathrm{{\boldsymbol{u}}}\,}}\le {{\,\mathrm{{\boldsymbol{u}}}\,}}_\textrm{max}, \\&{\boldsymbol{g}}({{\,\mathrm{{\boldsymbol{u}}}\,}}) \le 0, \\&{\boldsymbol{h}}({{\,\mathrm{{\boldsymbol{u}}}\,}}) = 0. \end{aligned} \end{aligned}$$
(20)

This optimization problem is solved with a standard Sequential Quadratic Programming (SQP) solver with BFGS updates, see [27].

4 Experimental set up for stiffness parameter identification

Based on the compliance model which was developed in Sect. 2 and the in Sect. 3 introduced aproach the experimental setup for the stiffness parameter identification has been implemented. The experiments are carried out on the six-axis heavy duty robot with a spindle as an effector. The robot cell that includes the heavy duty robot is built to carry out the hybrid manufacturing chain including additive and subtractive processes. Also included into the cell is the force sensor Omega 160 IP65 from ATI that is placed between the process effector and the sixth joint. The robot cell also includes a work table, an effector docking system to change the spindle for the additive manufacturing head and measurement equiment to define the position of the tool and machining parts. The robot cell is shown in Fig. 2.

Fig. 2
figure 2

Robot cell including the ABB IRB 6660-205/1.9 and the effectors

The setup to identify the deviation of the TCP under force contains the application of a defined force and the measurement of the deviation. To apply the force a pneumatic cylinder is used. It contains a force sensor to measure the applied force on the TCP so that the applied force can be adjusted. As in Sect. 3 described the force vectors are represented in the first condition of the inputs. The input \({{\,\mathrm{{\boldsymbol{u}}}\,}}_\textrm{min}\) is defined as \(-300\,\text{N}\) and the \({{\,\mathrm{{\boldsymbol{u}}}\,}}_\textrm{max}\) as \(+ 300\,\text{N}\) due to the experimental setup. To measure the deviation of the TCP under the defined force, three laser triangulation sensors of the type Keyence LK-G32 are used. The sensors have a measuring range \(\pm 5\,\text{mm}\) and an accuracy of \(1\,\upmu\text{m}\). They are applied around the TCP and measure the three directions X,Y and Z. To measure the force that is applied in the robot coordinate system also the integrated force sensor of the robot is used. With this the vectors of the applied force can be defined in the robot system. The experimental setup can be seen in Fig. 3.

Fig. 3
figure 3

Experimental setup containing laser sensors and the pneumatic cylinder

The advantages of this experimental setup are that it is a simple and fast setup, no changes of the robot system are necessary and the experiment does not influence any existing compensation or calibration. The measurements are executed for one position that is elected considering the workspace the robot operates in. To be able to represent the static force conditions of the peripheral milling processes, the experiments are examined with forces applied in X and Y direction. For the measurements only the orientation of the effector has to be changed and the direction of the applied force, the position in the cartesian coordinate system is not changed. The orientations of the effector and the applied force are calculated with the in Sect. 3 developed model. One measurement consists of one orientation of the effector and an applied force in one direction. To ensure that the orientation of the effector calculated in the model is reachable, the solution space of the model is limited. The orientation of the TCP is only allowed to be within the angle \(\phi\) of \(\pm 80^\circ\) between the direction of the vector of the joint six to the TCP and the direction vector between the robot base and the TCP regarding the Z plane. \(\phi\) is here defined as:

$$\begin{aligned} \begin{aligned} \phi = \arccos {\left( 1- \left( \frac{(\vert \vec {r}_{new}-\vec {r}_{TCP}\vert )^2}{\vert {(\vec {r}_{TCP} - \vec {r_{new}}}\vert )^2+(\vert \vec {r_{TCP}} - \vec {r_{new}})\vert ^2} \right) \right) } \end{aligned} \end{aligned}$$
(21)

The in Sect. 3 developed model needs initial values for the stiffness parameters to calculate the optimal joint angles \({{\,\mathrm{{\boldsymbol{\theta }}}\,}}_{i}\). Therefore the stiffness parameters from [6] are used as can be seen in Table 1.

Table 1 Initial values for stiffness parameters from [6]

The calculated design of experiments contains one position in the cartesian coordinate system, four orientations of the effector to reach this position and a total of five measurements. Three measurements are to be carried out with applied force in Y direction and two in X direction of the robot base coordinate system. The data of all sensors are collected via matlab and synchronised. Afterwards they serve as input variables for the model created in Sect. 3.

5 Parameter identification and validation

For the identification of the stiffness parameters different sets of data were used to analyse the influence of the number of experiments. The data of one measurement in one direction, of three measurements in the same direction and the data of all measurments were used to calculate differents sets of stiffness parameters. The results were then validated through comparison with the measured deviation in validation measurements. Also the set of stiffness parameters from the literature shown in Table 1 was compared to the calculated sets of stiffness parameters. An extract of the calculated sets of stiffness parameters from different measurements are shown in Table 2.

Table 2 Calculated stiffness parameters \(k_{i}\) in \(10^{6}\) [Nm/rad]

It can be seen that some sets of stiffness parameters differ enormus from the initial parameters from [6] shown in Table 2 while others correspond with the initial parameters. This can be explained by the direction of the applied force. For example during the measurements in the X direction the joint six was not loaded so that no information about this joint is contained in the data of this measurement. To validate the parameters and indentify the best set of stiffness parameters the deviation of the TCP in various positions and orientations of the main workspace of the robot was measured. Figure 4 shows the measured deviation and the with different stiffness parameter sets calculated deviation for one validation position. The results of the other carried out validation experiments for different positions are similar to the results shown in Fig. 4. It can be seen that overall the deviation of different positions and orientations can be predicted. The accuracy regarding the deviation in Y direction is higher than in X direction which can be explained by the facts that in Y direction more measurements were executed to identify the set of stiffness parameters, the deviation is higher and more gears were loaded during the experiments. The figure also shows that the results of the calculated deviation based on the calculated stiffness parameters are closer to the real deviation than the calculated deviation based on the set of stiffness parameters from literature. It can be seen that the stiffness parameters from measurements in Y direction and the stiffness parameters from all measurements have the highest accuracy while the stiffness parameters from the literature lead to the lowest accuracy. Overall the parameters from measurements in Y direction match the most if the outliners are disregarded.

Fig. 4
figure 4

Comparison of the calculated deviation based on different stiffness parameter sets and the measured deviation

This can also be seen in the covariant matrices that were calculated together with the stiffness parameters see Sect. 3. The covariant matrix of the measurements with the force direction X have the highest values while the covariant matrices of the measurements in force direction Y and of all measurements are close. They are by the factor 10 lower than the values in the covariant matrix of the measurements with the force direction X. The covariant matrix of the measurements in force direction Y are a little lower than the one of all measurements. The results of the covariant matrices are reflected in the results of the calculated deviations in Fig. 4 compared with the measured deviations. The stiffness parameter sets with the lowest covariant matrices results calculated are closest to the measured deviations.

Overall the data show that the measurements produce stiffness parameters with which the deviation can be estimated more accurate than with the stiffness parameters from the literature of the same robot model. Also the results show that the in Sect. 3 implemented approach is valid and with the calculated covariant matrices an estimation of the quality of the results can be made. Compared to [6] the amount of measurements are reduced up to 75 \(\%\) and the used experimental set up is less cost intensive and les complex compared to [1, 6]. Therefore this approach helps to identify the stiffness parameters by using a simple and cost efficient experimental setup.

6 Conclusion and outlook

The deviation of the TCP under process forces is the main influence on the working accuracy of the robotbased milling process. It limits the fields of applications of these systems. To extend the application possibilities the deviation of the TCP under static process force has to be detected and predicted. This paper shows an aproach to predict the deviation of an industrial robot under static process forces by identifying the stiffness parameters of the joints based on the bayes approach. Based on this approach an optimal design of experiments for the measurement of the deviation under a specific force is calculated. With this approach the uncertainties of the results are reduced and the level of information a measurment contains is increased. This approach leads to less measurements of the deviation for the identification of the stiffness parameters of an industrial robot which is more time efficient as other approaches. Also the experiments itself are less complex due to a simple setup and therefore more cost efficient than other approaches. The results show that the identified stiffness parameters lead to a sufficient accurate prediction of the deviation and thus the identified stiffness parameters are more accurate than the stiffness parameters from the literatur for the same robot model. The advantages of this experimental setup are that it is a simple and fast setup, no changes of the robot system were necessary and the experiment did not influence any existing compensation or calibration. Also the quality of the calculated stiffness parameters can be estimated through the calculated covariant matrices through this approach.

The experimental setup only allowed the application of force in one direction during a measurement. To increase the accuracy of this approach it is assumed that in an ideal experimental setup forces in two or three directions can be applied and with that the amount of measurements will be further reduced. Therefore the accuracy of the estimated set of stiffness parameters could be increased.

Nevertheless the results show that even with a less complex design of experiments the stiffness parameters are sufficient for the use for online or offline compensation. With the deviation model and the identified stiffness parameters an offline compensation will be implemented. Based on the forces of previous milling processes the deviation will be predicted and the new trajectory can be calculated. The paper shows that with this approach only a simple design of experiments is needed to identify sufficient accurate stiffness parameters to predict the deviation of the TCP. With this approach the influence of the process forces on the deviation during the milling process can be predicted and in a second step reduced so that the quality of the produced parts will be increased.