<figure><img src="image_1.png" /></figure>

HAL
open science

# The inverse kinematics of cable-driven parallel robot with more than 6 sagging cables Part 2: using neural networks

Jean-Pierre Merlet

► To cite this version:

Jean-Pierre Merlet. The inverse kinematics of cable-driven parallel robot with more than 6 sagging cables Part 2: using neural networks. ARK 2024 - 19th International Symposium on advances in robot kinematics, Jun 2024, Ljubljana, Slovenia. hal-04609264

HAL Id: hal-04609264

https://inria.hal.science/hal-04609264

Submitted on 12 Jun 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_1.png" /></figure>

HAL
open science

# The inverse kinematics of cable-driven parallel robot with more than 6 sagging cables Part 2: using neural networks

Jean-Pierre Merlet

► To cite this version:

Jean-Pierre Merlet. The inverse kinematics of cable-driven parallel robot with more than 6 sagging cables Part 2: using neural networks. ARK 2024 - 19th International Symposium on advances in robot kinematics, Jun 2024, Ljubljana, Slovenia. hal-04609264

HAL Id: hal-04609264

https://inria.hal.science/hal-04609264v1

Submitted on 12 Jun 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# The inverse kinematics of cable-driven parallel robot with more than 6 sagging cables
## Part 2: using neural networks

J-P. Merlet

**Abstract** A cable-driven parallel robot (CDPR) has *n* cables whose lengths are used to control the pose of the platform. We assume here a 6 d.o.f CDPR with *n* > 6 cables that have elasticity and mass i.e. are sagging cables. In that case the inverse kinematics (IK, i.e. finding the cable lengths to reach a given platform pose) has usually an infinite number of solutions. It is then common to look for an IK solution that satisfies some optimality condition usually related to the cable tensions. Determining the global optimum with sagging cables is very difficult as we have to deal with highly non linear constraints. In a companion paper we have proposed an algorithm for finding possibly the optimal solution with an iterative method that has a relatively large computation time. In this paper we investigate the use of neural networks for speeding up the solving time.

# 1 Introduction

Cable-driven parallel robot (CDPR) are using cables going through a fixed point in space and ending at a point on the platform. A winching mechanism (either a rotary winch or using linear actuators) allows one to modify the lengths of the cable. For a CDPR with at least 6 cables an appropriate adjustment of the cable lengths allows for the control of the 6 d.o.f of the platform. We will denote by $A_i$ and $B_i$ respectively the fixed points and platform attachment points for cable $i$. Statics plays an essential role on the workspace of a CDPR because cable can only pull. A direct consequence is that the projection of the platform on the ground roughly cannot be outside the convex hull of the projection of the $A_i$ points on the ground, the vertical

<footnote>J-P. Merlet</footnote>

<footnote>INRIA Sophia-Antipolis, e-mail: Jean-Pierre.Merlet@inria.fr. This work has been partly supported by grant ANR-19-P3IA-0002.</footnote>
# The inverse kinematics of cable-driven parallel robot with more than 6 sagging cables
## Part 2: using neural networks

J-P. Merlet

**Abstract** A cable-driven parallel robot (CDPR) has *n* cables whose lengths are used to control the pose of the platform. We assume here a 6 d.o.f CDPR with *n* > 6 cables that have elasticity and mass i.e. are sagging cables. In that case the inverse kinematics (IK, i.e. finding the cable lengths to reach a given platform pose) has usually an infinite number of solutions. It is then common to look for an IK solution that satisfies some optimality condition usually related to the cable tensions. Determining the global optimum with sagging cables is very difficult as we have to deal with highly non linear constraints. In a companion paper we have proposed an algorithm for finding possibly the optimal solution with an iterative method that has a relatively large computation time. In this paper we investigate the use of neural networks for speeding up the solving time.

# 1 Introduction

Cable-driven parallel robot (CDPR) are using cables going through a fixed point in space and ending at a point on the platform. A winching mechanism (either a rotary winch or using linear actuators) allows one to modify the lengths of the cable. For a CDPR with at least 6 cables an appropriate adjustment of the cable lengths allows for the control of the 6 d.o.f of the platform. We will denote by $A_i$ and $B_i$ respectively the fixed points and platform attachment points for cable $i$. Statics plays an essential role on the workspace of a CDPR because cable can only pull. A direct consequence is that the projection of the platform on the ground roughly cannot be outside the convex hull of the projection of the $A_i$ points on the ground, the vertical

<footnote>J-P. Merlet</footnote>

<footnote>INRIA Sophia-Antipolis, e-mail: Jean-Pierre.Merlet@inria.fr. This work has been partly supported by grant ANR-19-P3IA-0002.</footnote>
limit being ruled by the maximal length/tension of the cables. Consequently it may be interesting to have more than 6 cables for increasing the CDPR workspace. Beside the workspace key elements for CDPR control, analysis and design optimization are inverse kinematics (IK) and direct kinematics (DK) which respectively consists in determining the cable lengths for reaching a given pose and determining the platform poses for given cable lengths. In this paper we will focus on the IK problem and use as example the 6 d.o.f. CDPR Cogiro with 8 cables [3]. For this robot the locations of the $A_i$ points in a reference frame and the $B_i$ in the mobile frame are provided in the companion paper [7].

The equations governing the kinematics may be distributed into two categories:

1. geometric in a broad sense: they provide the relationships between the cable lengths and the platform pose

2. statics: to establish the relationships between the cable tensions and platform pose to obtain mechanical equilibrium

Cable modeling play an essential role for both categories and we will consider here *sagging cable* with mass and elasticity. IK plays a major role in CDPR analysis and optimization e.g. to determine the CDPR workspace or to determine the maximal cable tensions over a given workspace determined by bounds on the generalized coordinates of the platform. These types of problem are complex to solve analytically or numerically for sagging cables and we may have to resort to a discretization of the workspace which implies that the IK solving should be very fast. In this paper, unless otherwise indicated, we will use as units meters and Newton.

## 2 Inverse kinematics and sagging cables

Sagging cable model takes into account the proper mass of the cable together with its elasticity so that there always will be tension in the cable because of its mass. There are numerous sagging cable models [2, 10, 5, 8, 9, 10, 11] and we have adopted the classical model presented in the textbook of Irvine [4]. Irvine model is planar: the cable is attached at one of its extremity A and is submitted at its other extremity B to a force with $F_x, F_z$ horizontal and vertical components. In the planar frame with origin at A, an horizontal axis $x_i$ and vertical axis $z_i$ the coordinates of B are $x_b, z_b$. The Irvine model relates $x_b, z_b$ to $F_x, F_z$ and to the cable length at rest $L_0$. We have:

$$x_b = F_x \left( \frac{L_0}{EA_0} + \frac{\sinh^{-1}\left(\frac{F_z}{F_x}\right) - \sinh^{-1}\left(\frac{-\mu g L_0 + F_z}{F_x}\right)}{\mu g} \right) \quad (1)$$
limit being ruled by the maximal length/tension of the cables. Consequently it may be interesting to have more than 6 cables for increasing the CDPR workspace. Beside the workspace key elements for CDPR control, analysis and design optimization are inverse kinematics (IK) and direct kinematics (DK) which respectively consists in determining the cable lengths for reaching a given pose and determining the platform poses for given cable lengths. In this paper we will focus on the IK problem and use as example the 6 d.o.f. CDPR Cogiro with 8 cables [3]. For this robot the locations of the $A_i$ points in a reference frame and the $B_i$ in the mobile frame are provided in the companion paper [7]

The equations governing the kinematics may be distributed into two categories:

1. geometric in a broad sense: they provide the relationships between the cable lengths and the platform pose

2. statics: to establish the relationships between the cable tensions and platform pose to obtain mechanical equilibrium

Cable modeling play an essential role for both categories and we will consider here *sagging cable* with mass and elasticity. IK plays a major role in CDPR analysis and optimization e.g. to determine the CDPR workspace or to determine the maximal cable tensions over a given workspace determined by bounds on the generalized coordinates of the platform. These types of problem are complex to solve analytically or numerically for sagging cables and we may have to resort to a discretization of the workspace which implies that the IK solving should be very fast. In this paper, unless otherwise indicated, we will use as units meters and Newton.

## 2 Inverse kinematics and sagging cables

Sagging cable model takes into account the proper mass of the cable together with its elasticity so that there always will be tension in the cable because of its mass. There are numerous sagging cable models [2, 10, 5, 8, 9, 10, 11] and we have adopted the classical model presented in the textbook of Irvine [4]. Irvine model is planar: the cable is attached at one of its extremity A and is submitted at its other extremity B to a force with $F_x, F_z$ horizontal and vertical components. In the planar frame with origin at A, an horizontal axis $x_i$ and vertical axis $z_i$ the coordinates of B are $x_b, z_b$. The Irvine model relates $x_b, z_b$ to $F_x, F_z$ and to the cable length at rest $L_0$. We have:

$$x_b = F_x \left( \frac{L_0}{EA_0} + \frac{\sinh^{-1}\left(\frac{F_z}{F_x}\right) - \sinh^{-1}\left(\frac{-\mu g L_0 + F_z}{F_x}\right)}{\mu g} \right) \quad (1)$$
$$z_b = \frac{F_z L_0}{E A_0} - \frac{\mu g L_0^2}{2 E A_0} + \frac{\sqrt{F_x^2 + F_z^2} - \sqrt{F_x^2 + (-\mu g L_0 + F_z)^2}}{\mu g} \quad (2)$$

where $E$ is the Young modulus of the cable material (which characterizes its elasticity), $\mu$ the linear density of the material and $A_0$ the area of a cable cross-section. For the example we will assume that all cables are identical with $\mu = 0.079$ kg/m, a diameter of 4 mm and $E = 1e11$ Pa. Note that because of the arbitrary choice of the direction of the $x$ axis we impose $x_b, F_x$ to be positive.

For a CDPR with $n$ cables we have the $2n$ Irvine equations and $6$ equations that describes the mechanical equilibrium for a total of $2n+6$ equations. In terms of unknowns we have the $n$ triplets $(F_x, F_z, L_0)$ and therefore $3n$ unknowns (for the sake of simplicity we denote by $u_1, u_2, \dots, u_{24}$ the $24$ unknowns of the IK). Consequently if $n > 6$, then we have an underconstrained system with less equations than unknowns: in our CDPR example with $8$ cables we have $22$ equations and $24$ unknowns. Hence to obtain an IK solution we have to define an optimality condition. We use as criteria the norm of the cable tensions at the $A_i$, this tension being equal to $\sqrt{F_x^2 + (F_z - \mu g L_0)^2}$ but the approach proposed for solving the IK is generic and may be used with any other criteria as soon as it is continuous. However the non linear nature of the Irvine equations leads to a constrained optimization problem that is very difficult to solve and, to the best of the author knowledge this IK problem for a 6 d.o.f CDPR with more than 6 sagging cables has not yet been addressed: the use of neural network for a planar CDPR has been presented in [1] (with a very large training time, 168h) while reinforcement learning has been used to optimize tension distribution in a 4-cables, 3 d.o.f. CDPR, sagging being ignored [12].

Note also that at the opposite of the ideal cables case the non linearity of the equations prohibits to deduce the IK solution for a given platform mass directly from the IK solution for a different mass.

## 3 Inverse kinematics with neural networks

In a companion paper [7] we have proposed an algorithm to solve the IK problem with an iterative method but with a computation time (between 5 and 46 minutes) that is not appropriate for its use in analysis and design optimization of CDPR. We have therefore considered the use of *supervised neural networks*, requiring a learning set, which are known to be very fast in term of exploitation (i.e. getting the result for a given input) while possibly requiring a large training time. A learning set consists in a large number of samples of the form $(\mathcal{I}, \mathcal{E})$ where $\mathcal{I}$ is the input of the problem (in our case the pose of the platform) and $\mathcal{E}$ is the exact output of the problem (in our case the cable lengths). We are using the *multi-layer perceptron (MLP)* network
$$z_b = \frac{F_z L_0}{E A_0} - \frac{\mu g L_0^2}{2 E A_0} + \frac{\sqrt{F_x^2 + F_z^2} - \sqrt{F_x^2 + (-\mu g L_0 + F_z)^2}}{\mu g} \quad (2)$$

where $E$ is the Young modulus of the cable material (which characterizes its elasticity), $\mu$ the linear density of the material and $A_0$ the area of a cable cross-section. For the example we will assume that all cables are identical with $\mu = 0.079$ kg/m, a diameter of 4 mm and $E = 1e11$ Pa. Note that because of the arbitrary choice of the direction of the $x$ axis we impose $x_b, F_x$ to be positive.

For a CDPR with $n$ cables we have the $2n$ Irvine equations and $6$ equations that describes the mechanical equilibrium for a total of $2n+6$ equations. In terms of unknowns we have the $n$ triplets $(F_x, F_z, L_0)$ and therefore $3n$ unknowns (for the sake of simplicity we denote by $u_1, u_2, \dots, u_{24}$ the $24$ unknowns of the IK). Consequently if $n > 6$, then we have an underconstrained system with less equations than unknowns: in our CDPR example with $8$ cables we have $22$ equations and $24$ unknowns. Hence to obtain an IK solution we have to define an optimality condition. We use as criteria the norm of the cable tensions at the $A_i$, this tension being equal to $\sqrt{F_x^2 + (F_z - \mu g L_0)^2}$ but the approach proposed for solving the IK is generic and may be used with any other criteria as soon as it is continuous. However the non linear nature of the Irvine equations leads to a constrained optimization problem that is very difficult to solve and, to the best of the author knowledge this IK problem for a 6 d.o.f CDPR with more than 6 sagging cables has not yet been addressed: the use of neural network for a planar CDPR has been presented in [1] (with a very large training time, 168h) while reinforcement learning has been used to optimize tension distribution in a 4-cables, 3 d.o.f. CDPR, sagging being ignored [12].

Note also that at the opposite of the ideal cables case the non linearity of the equations prohibits to deduce the IK solution for a given platform mass directly from the IK solution for a different mass.

## 3 Inverse kinematics with neural networks

In a companion paper [7] we have proposed an algorithm to solve the IK problem with an iterative method but with a computation time (between 5 and 46 minutes) that is not appropriate for its use in analysis and design optimization of CDPR. We have therefore considered the use of *supervised neural networks*, requiring a learning set, which are known to be very fast in term of exploitation (i.e. getting the result for a given input) while possibly requiring a large training time. A learning set consists in a large number of samples of the form $(\mathcal{I}, \mathcal{E})$ where $\mathcal{I}$ is the input of the problem (in our case the pose of the platform) and $\mathcal{E}$ is the exact output of the problem (in our case the cable lengths). We are using the *multi-layer perceptron (MLP)* network
whose geometry is defined by the number of layers, the number of neurons in each layer, the activation function for the neurons, the learning rate and the loss function. This function is a statistical function related to the differences between the MLP prediction $P_i$ and the exact output $E_i$ over all samples $i$ in the learning set. Training a MLP consists in incrementally decreasing the loss by using an optimizer that estimates the weights and bias for each neuron in the layers. The optimizer is usually a stochastic gradient descent algorithm that uses the learning rate to calculate the gradient.

After preliminary trial we have determined that the most appropriate loss was the MSE and that the number of neurons was not playing a significant role so we fix it to 200. As for the learning rate we choose an adaptive one: its initial value is set to 1e-3 and if after 15 optimization steps the loss has not decreased we divide the learning rate by 2 and we stop the training if it becomes lower than 1e-6.

For using neural networks we have to obtain a sufficiently large *training set* but also a *verification set* with samples having inputs $\mathcal{I}$ that are all different from any input used in the training set in order to assess the quality of the predictions of the neural network.

## 3.1 Obtaining training and verification sets

Let us assume that we have been able to calculate the IK solution $S_1, S_2, \dots, S_m$ for $m$ poses $\mathbf{X}_1, \mathbf{X}_2, \dots, \mathbf{X}_m$ that are roughly equally distributed in the workspace of the CDPR. To create a training set we will consider a path in the generalized coordinates space of the platform that connects linearly two poses $\mathbf{X}_i, \mathbf{X}_j$. We define a continuation scheme on the platform pose by setting it to $\mathbf{X} = \mathbf{X}_i + \lambda(\mathbf{X}_j - \mathbf{X}_i)$. However a continuation scheme cannot be directly used as we have not a square system. Hence we will set pair of unknowns $(u_k, u_l)$ to their values at $S_i$ and apply the following algorithm, starting with $\lambda = 0$, a small $\epsilon$ (typically 1e-6) and $S = S_i$:

1. if $\epsilon$ is lower than a very small threshold (typically 1e-8) we are close to a system singularity and exit

2. we set $\lambda_i$ to $\lambda$, $\lambda$ to $\lambda + \epsilon \le 1$. $S$ is used as guess for the Newton scheme for the new system

3. a. if Newton does not converge or one of the $F_x$ of the solution is negative we divide $\epsilon$ by 2, set $\lambda = \lambda_i$ and restart at step 1

b. if Newton converge to a solution $S$ with all $F_x > 0$ a minimizer is used to determine a solution $S'$ around $S$ that minimizes the criteria, considering the 24 unknowns so that the values of $u_k, u_l$ may change at each step. If the minimizer failed we divide $\epsilon$ by 2, set $\lambda$ to $\lambda_i$ and restart at step 1. If it is successful we set $S = S'$, we increase $\epsilon$ (e.g. by 10%). and go to step 1 unless $\lambda = 1$ (in that case the platform is at pose $\mathbf{X}_j$ and we exit)
whose geometry is defined by the number of layers, the number of neurons in each layer, the activation function for the neurons, the learning rate and the loss function. This function is a statistical function related to the differences between the MLP prediction $P_i$ and the exact output $E_i$ over all samples $i$ in the learning set. Training a MLP consists in incrementally decreasing the loss by using an optimizer that estimates the weights and bias for each neuron in the layers. The optimizer is usually a stochastic gradient descent algorithm that uses the learning rate to calculate the gradient.

After preliminary trial we have determined that the most appropriate loss was the MSE and that the number of neurons was not playing a significant role so we fix it to 200. As for the learning rate we choose an adaptive one: its initial value is set to 1e-3 and if after 15 optimization steps the loss has not decreased we divide the learning rate by 2 and we stop the training if it becomes lower than 1e-6.

For using neural networks we have to obtain a sufficiently large *training set* but also a *verification set* with samples having inputs $\mathcal{I}$ that are all different from any input used in the training set in order to assess the quality of the predictions of the neural network.

## 3.1 Obtaining training and verification sets

Let us assume that we have been able to calculate the IK solution $S_1, S_2, \dots, S_m$ for $m$ poses $\mathbf{X}_1, \mathbf{X}_2, \dots, \mathbf{X}_m$ that are roughly equally distributed in the workspace of the CDPR. To create a training set we will consider a path in the generalized coordinates space of the platform that connects linearly two poses $\mathbf{X}_i, \mathbf{X}_j$. We define a continuation scheme on the platform pose by setting it to $\mathbf{X} = \mathbf{X}_i + \lambda(\mathbf{X}_j - \mathbf{X}_i)$. However a continuation scheme cannot be directly used as we have not a square system. Hence we will set pair of unknowns $(u_k, u_l)$ to their values at $S_i$ and apply the following algorithm, starting with $\lambda = 0$, a small $\epsilon$ (typically 1e-6) and $S = S_i$:

1. if $\epsilon$ is lower than a very small threshold (typically 1e-8) we are close to a system singularity and exit

2. we set $\lambda_i$ to $\lambda$, $\lambda$ to $\lambda + \epsilon \le 1$. $S$ is used as guess for the Newton scheme for the new system

3. a. if Newton does not converge or one of the $F_x$ of the solution is negative we divide $\epsilon$ by 2, set $\lambda = \lambda_i$ and restart at step 1

b. if Newton converge to a solution $S$ with all $F_x > 0$ a minimizer is used to determine a solution $S'$ around $S$ that minimizes the criteria, considering the 24 unknowns so that the values of $u_k, u_l$ may change at each step. If the minimizer failed we divide $\epsilon$ by 2, set $\lambda$ to $\lambda_i$ and restart at step 1. If it is successful we set $S = S'$, we increase $\epsilon$ (e.g. by 10%). and go to step 1 unless $\lambda = 1$ (in that case the platform is at pose $\mathbf{X}_j$ and we exit)
This process is repeated for each of the 276 possible pairs of $(u_k, u_l)$ until a pair is found such that the algorithm exit with $\lambda = 1$ and the IK at $\mathbf{X}_j$ is equal to $S_j$. When following this pose path we store samples using storage rules such as that the distance between the location of $G$ of two successive stored poses should be greater or equal to a given threshold and/or that the change of a cable length is greater or equal to a threshold. This process is applied on each pair of poses $\mathbf{X}_i, \mathbf{X}_j, j > i$ and we adjust the thresholds in the storage rules to obtain approximately a given number of samples.

The process for creating a verification set is similar but we introduce randomness to avoid a bias between the learning and verification set. We start in sequence from one of $m$ poses $\mathbf{X}_i$ (whose solution $S_i$ included in the set) and we select two random 3D unit vectors $\mathbf{v}_G, \mathbf{v}_o$ such that the $G$ location $X_G$ and the orientation angles $\Theta$ of a pose are obtained as

$$X_G = X_i + \lambda \mathbf{v}_G \quad \Theta = \Theta_i + \lambda \mathbf{v}_o \quad (3)$$

where $X_i, \Theta_i$ are respectively the $G$ coordinates and orientation angles at the pose $\mathbf{X}_i$. We then use the previous continuation process to determine the IK solutions along the direction $\mathbf{v}_G, \mathbf{v}_o$ and store the samples in the verification set according to the same storage rules used for the training set.

In our example we have selected as $\mathbf{X}_i$ roughly 29 possible locations of $G$, each of them associated to 8 different orientations, leading to a total of 238 poses. The computation time for establishing the training set is about 50 minutes. The training set obtained from these $\mathbf{X}_i$ has 6183 samples and the verification set has 1325 samples with the location of $G$ such that $x \in [-4, 4]$, $y \in [-3, 3]$ and $z \in [0, 2]$.

## 3.2 Training

For the training we use the PyTorch library and we have still to determine the number of layers and the activation function that is used for the neurons. There is no rule for determining these parameters and as preliminary results have shown that the training time was low (between 1 and 5 minutes) we have performed a systematic approach by testing each parameters combination with a number of layers between 2 and 11 and an activation function in the set {ReLU, CELU, LeakyReLU}. We have first trained one MLP with the whole training set but the result was very poor: figure 1 provides the log of the final loss according to the number of layers and to the activation function.

As may be seen the final loss is very large (83326 for the best MLP) and, unsurprisingly, when the predictions of the MLP for the training set were not satisfying the 22 equations by far, while the errors on the optimality criteria were huge. For example the mean error for $L_{03}$ was 132.32 with a maximum of 7775 and the mean error on $F_{x4}$ is 104.76 with a max at 807. Over all $L_0$
This process is repeated for each of the 276 possible pairs of $(u_k, u_l)$ until a pair is found such that the algorithm exit with $\lambda = 1$ and the IK at $\mathbf{X}_j$ is equal to $S_j$. When following this pose path we store samples using storage rules such as that the distance between the location of $G$ of two successive stored poses should be greater or equal to a given threshold and/or that the change of a cable length is greater or equal to a threshold. This process is applied on each pair of poses $\mathbf{X}_i, \mathbf{X}_j, j > i$ and we adjust the thresholds in the storage rules to obtain approximately a given number of samples.

The process for creating a verification set is similar but we introduce randomness to avoid a bias between the learning and verification set. We start in sequence from one of $m$ poses $\mathbf{X}_i$ (whose solution $S_i$ included in the set) and we select two random 3D unit vectors $\mathbf{v}_G, \mathbf{v}_o$ such that the $G$ location $X_G$ and the orientation angles $\Theta$ of a pose are obtained as

$$X_G = X_i + \lambda \mathbf{v}_G \quad \Theta = \Theta_i + \lambda \mathbf{v}_o \quad (3)$$

where $X_i, \Theta_i$ are respectively the $G$ coordinates and orientation angles at the pose $\mathbf{X}_i$. We then use the previous continuation process to determine the IK solutions along the direction $\mathbf{v}_G, \mathbf{v}_o$ and store the samples in the verification set according to the same storage rules used for the training set.

In our example we have selected as $\mathbf{X}_i$ roughly 29 possible locations of $G$, each of them associated to 8 different orientations, leading to a total of 238 poses. The computation time for establishing the training set is about 50 minutes. The training set obtained from these $\mathbf{X}_i$ has 6183 samples and the verification set has 1325 samples with the location of $G$ such that $x \in [-4, 4]$, $y \in [-3, 3]$ and $z \in [0, 2]$.

## 3.2 Training

For the training we use the PyTorch library and we have still to determine the number of layers and the activation function that is used for the neurons. There is no rule for determining these parameters and as preliminary results have shown that the training time was low (between 1 and 5 minutes) we have performed a systematic approach by testing each parameters combination with a number of layers between 2 and 11 and an activation function in the set {ReLU, CELU, LeakyReLU}. We have first trained one MLP with the whole training set but the result was very poor: figure 1 provides the log of the final loss according to the number of layers and to the activation function.

As may be seen the final loss is very large (83326 for the best MLP) and, unsurprisingly, when the predictions of the MLP for the training set were not satisfying the 22 equations by far, while the errors on the optimality criteria were huge. For example the mean error for $L_{03}$ was 132.32 with a maximum of 7775 and the mean error on $F_{x4}$ is 104.76 with a max at 807. Over all $L_0$
<figure><img src="image_3.png" /><figcaption>**Fig. 1** The log of the final loss value according to the number of layers and activation function</figcaption></figure>

the mean error is 24.035 (roughly 250%), 95.77 for the $F_x$, 24.03 for the $F_z$ and 170.97 on the criteria (roughly 35%).

This poor result were expected as a similar phenomena was observed when dealing with the DK problem [6]. Using a similar strategy than when dealing with the DK we first adopt a *structuration* of the training set by splitting the samples according to their *x*, *y*, *z* values, the allowed range of each these input variables being split into two ranges (e.g. for *x* we use the ranges [-4,0], [0,4]) leading to a total of 8 learning sets with a total of 6201 samples (when the number of samples in a learning set was too low we use the algorithm described in section 3.1 to add samples). This simple approach leads to a drastic improvement of the final loss: typically for one of the 8 MLPs it moves down from 83326 to 2.82 as shown in figure 2.

Getting a prediction is very fast (mean time value: 0.0045 seconds) and while the prediction clearly will not provide an exact solution of the 22 equations (e.g. the mean error on the $L_0$ is about 4-6%) we however get a reasonably good estimation of the criteria: we get an error of less than 5% for 78.79% of the samples, less than 10% for 86.26% and less than 15% for 90.26%, the maximal error being about 45%.

A possible improvement of the results is based on an *hybridization* of the MLP i.e. using the MLP predictions as a starting point for an iterative process that improves the results. We may consider two possibilities:

1. use the minimizer with the prediction as initial point

2. use the prediction as guess for a Newton scheme and then use the result of the Newton scheme if convergent as initial point for the minimizer

Our test with the 1325 samples of the verification test have shown that in both cases we get 1323 exact IK solutions but the first approach is faster with a solving time per sample of 1.29 seconds while the second approach leads to a computation time of 4.47 seconds because of the large number of
<figure><img src="image_3.png" /><figcaption>**Fig. 1** The log of the final loss value according to the number of layers and activation function</figcaption></figure>

the mean error is 24.035 (roughly 250%), 95.77 for the $F_x$, 24.03 for the $F_z$ and 170.97 on the criteria (roughly 35%).

This poor result were expected as a similar phenomena was observed when dealing with the DK problem [6]. Using a similar strategy than when dealing with the DK we first adopt a *structuration* of the training set by splitting the samples according to their *x*, *y*, *z* values, the allowed range of each these input variables being split into two ranges (e.g. for *x* we use the ranges [-4,0], [0,4]) leading to a total of 8 learning sets with a total of 6201 samples (when the number of samples in a learning set was too low we use the algorithm described in section 3.1 to add samples). This simple approach leads to a drastic improvement of the final loss: typically for one of the 8 MLPs it moves down from 83326 to 2.82 as shown in figure 2.

Getting a prediction is very fast (mean time value: 0.0045 seconds) and while the prediction clearly will not provide an exact solution of the 22 equations (e.g. the mean error on the $L_0$ is about 4-6%) we however get a reasonably good estimation of the criteria: we get an error of less than 5% for 78.79% of the samples, less than 10% for 86.26% and less than 15% for 90.26%, the maximal error being about 45%.

A possible improvement of the results is based on an *hybridization* of the MLP i.e. using the MLP predictions as a starting point for an iterative process that improves the results. We may consider two possibilities:

1. use the minimizer with the prediction as initial point

2. use the prediction as guess for a Newton scheme and then use the result of the Newton scheme if convergent as initial point for the minimizer

Our test with the 1325 samples of the verification test have shown that in both cases we get 1323 exact IK solutions but the first approach is faster with a solving time per sample of 1.29 seconds while the second approach leads to a computation time of 4.47 seconds because of the large number of
<figure><img src="image_4.png" /><figcaption>**Fig. 2** Typical log of the final loss value according to the number of layers and activation function for a subset of the initial training set</figcaption></figure>

Newton schemes that have to be run. We may compare the method presented in [7] that computes an IK solution in about *T* seconds (with *T* in [300,2760]) to the neural network approach. We have seen that we have used 238 poses with an IK solution and 50 minutes were required for establishing each of the 8 training sets. We have tested 30 neural networks for each set, each of them requiring around 3 minutes of training time. Therefore the total time in second for solving *N* IK problems is 14280*T* + 67200 + 1.29*N* while the direct method require *N*T seconds. Accordingly the neural network approach will be faster as soon we have between *N* ≥ 464 (*T* = 300) and *N* ≥ 263 (*T* = 2760) IK problems to solve.

## 4 Conclusion

Neural network is an interesting mean to solve the IK problem. We have shown that even without calculating exactly the IK solution we may estimate with a reasonable accuracy the optimal cable tension in a very fast way while an exact solution may be calculated in a faster way compared to the method proposed in [7] as soon as the number of IK problems to solve is large enough, which will be the case during the analysis and optimization of the CDPR. We have also shown that getting exact IK solutions was possible in a larger computation time and possibly sacrificing some of the optimality condition. Note that both methods are appropriate for a distributed implementation that will drastically speed up the solving time. We plan also to investigate another training method based not only on the decrease of the loss but also on the number of samples for which the minimizer leads to the exact solution
<figure><img src="image_4.png" /><figcaption>**Fig. 2** Typical log of the final loss value according to the number of layers and activation function for a subset of the initial training set</figcaption></figure>

Newton schemes that have to be run. We may compare the method presented in [7] that computes an IK solution in about *T* seconds (with *T* in [300,2760]) to the neural network approach. We have seen that we have used 238 poses with an IK solution and 50 minutes were required for establishing each of the 8 training sets. We have tested 30 neural networks for each set, each of them requiring around 3 minutes of training time. Therefore the total time in second for solving *N* IK problems is 14280*T* + 67200 + 1.29*N* while the direct method require *N*T seconds. Accordingly the neural network approach will be faster as soon we have between *N* ≥ 464 (*T* = 300) and *N* ≥ 263 (*T* = 2760) IK problems to solve.

# 4 Conclusion

Neural network is an interesting mean to solve the IK problem. We have shown that even without calculating exactly the IK solution we may estimate with a reasonable accuracy the optimal cable tension in a very fast way while an exact solution may be calculated in a faster way compared to the method proposed in [7] as soon as the number of IK problems to solve is large enough, which will be the case during the analysis and optimization of the CDPR. We have also shown that getting exact IK solutions was possible in a larger computation time and possibly sacrificing some of the optimality condition. Note that both methods are appropriate for a distributed implementation that will drastically speed up the solving time. We plan also to investigate another training method based not only on the decrease of the loss but also on the number of samples for which the minimizer leads to the exact solution
with the current MLP, stopping the training if this is the case for all samples
in the training set. This method has proven to be very effective for the DK.

References

1. Chawla, I., et al.: Neural network-based inverse kineto-static analysis of cable-driven parallel robot considering cable mass and elasticity. In: 5th Int. Conf. on cable-driven parallel robots (CableCon). virtual (July, 7-9, 2021)

2. Ghoreishi, S., et al.: Analytical modeling of synthetic fiber rope. part II: a linear elastic model for 1+6 fibrous structure. Int. J. of Solids and Structures pp. 2943–2966 (2007)

3. Gouttefarde, M., Collard, J., Riehl, N., Baradat, C.: Geometry selection of a redundantly actuated cable-suspended parallel robot. IEEE Trans. on Robotics 31(2), 501–510 (April 2015)

4. Irvine, H.M.: Cable Structures. MIT Press (1981)

5. Lambert, C., Nahon, M.: Study of a multitethered aerostat system: experimental observations and model validation. Journal of Aircraft 43(4) (2006)

6. Merlet, J.P.: Advances in the use of neural network for solving the direct kinematics of CDPR with sagging cable. In: 6th Int. Conf. on cable-driven parallel robots (CableCon). Nantes (June, 25-28, 2023),

7. Merlet, J.P.: The inverse kinematics of cable-driven parallel robot with more than 6 sagging cables. part 1: from ideal to sagging cables. In: ARK. Ljulbjana (June 30-July 4, 2024)

8. Miermeister, P., et al.: An elastic cable model for cable-driven parallel robots including hysteresis effect. In: 2nd Int. Conf. on cable-driven parallel robots (CableCon). pp. 17–28. Duisburg (August, 24-27, 2014)

9. Piao, J., et al.: Open-loop position control of a polymer cable-driven parallel robot via a viscoelastic cable model for high payload workspaces. Advances in Mechanical Engineering 9(12) (2017)

10. Sergiienko, N., Cazzolato, B., Ding, B., Arjomandi, M.: An optimal arrangement of mooring lines for the three-tether submerged point-absorbing wave energy converter. Renewable Energy 93, 27–37 (2016)

11. Wu, W., Cao, X.: Mechanics model and its equation of wire rope based on elastic thin rod theory. International Journal of Solids and Structures 102-103, 21 – 29 (2016)

12. Xie, C., et al.: Deep reinforcement learning based cable tension distribution optimization for cable-driven rehabilitation robot. In: IEEE Int. Conf. on Advanced Robotics and Mechatronics. Chongqing (July, 3-5, 2021)
with the current MLP, stopping the training if this is the case for all samples
in the training set. This method has proven to be very effective for the DK.

References

1. Chawla, I., et al.: Neural network-based inverse kineto-static analysis of cable-driven parallel robot considering cable mass and elasticity. In: 5th Int. Conf. on cable-driven parallel robots (CableCon). virtual (July, 7-9, 2021)

2. Ghoreishi, S., et al.: Analytical modeling of synthetic fiber rope. part II: a linear elastic model for 1+6 fibrous structure. Int. J. of Solids and Structures pp. 2943–2966 (2007)

3. Gouttefarde, M., Collard, J., Riehl, N., Baradat, C.: Geometry selection of a redundantly actuated cable-suspended parallel robot. IEEE Trans. on Robotics 31(2), 501–510 (April 2015)

4. Irvine, H.M.: Cable Structures. MIT Press (1981)

5. Lambert, C., Nahon, M.: Study of a multitethered aerostat system: experimental observations and model validation. Journal of Aircraft 43(4) (2006)

6. Merlet, J.P.: Advances in the use of neural network for solving the direct kinematics of CDPR with sagging cable. In: 6th Int. Conf. on cable-driven parallel robots (CableCon). Nantes (June, 25-28, 2023),

7. Merlet, J.P.: The inverse kinematics of cable-driven parallel robot with more than 6 sagging cables. part 1: from ideal to sagging cables. In: ARK. Ljulbjana (June 30-July 4, 2024)

8. Miermeister, P., et al.: An elastic cable model for cable-driven parallel robots including hysteresis effect. In: 2nd Int. Conf. on cable-driven parallel robots (CableCon). pp. 17–28. Duisburg (August, 24-27, 2014)

9. Piao, J., et al.: Open-loop position control of a polymer cable-driven parallel robot via a viscoelastic cable model for high payload workspaces. Advances in Mechanical Engineering 9(12) (2017)

10. Sergiienko, N., Cazzolato, B., Ding, B., Arjomandi, M.: An optimal arrangement of mooring lines for the three-tether submerged point-absorbing wave energy converter. Renewable Energy 93, 27–37 (2016)

11. Wu, W., Cao, X.: Mechanics model and its equation of wire rope based on elastic thin rod theory. International Journal of Solids and Structures 102-103, 21 – 29 (2016)

12. Xie, C., et al.: Deep reinforcement learning based cable tension distribution optimization for cable-driven rehabilitation robot. In: IEEE Int. Conf. on Advanced Robotics and Mechatronics. Chongqing (July, 3-5, 2021)