1 Relevance of automated fiber laying technology

The complexity of products obtained from composite materials is constantly growing, and at the same time, the complexity of the technologies for their production is growing, in this regard, a person is unable to provide these technologies with the required quality indicators. Industrial robots come to the rescue, performing elementary operations with high accuracy and repeatability (within 0.1 mm). Conventionally automated methods for producing composite materials from carbon fiber can be divided into 4 main technologies: (1) Robotic laying out of a product made of carbon fiber sheets on a mandrel with subsequent compaction with rollers; (2) Printing on 3D printers with embedded carbon fiber filaments; (3) Robotic non-rimmed volumetric laying of products with carbon fiber thread or tape; (4) Robotic laying out of products with carbon fiber thread or tape on a mandrel with subsequent sealing.

In accordance with the first technology [1] one or more robots lay out pieces of carbon fabric on a pre-prepared mandrel. Another robot densifies the fabric on the mandrel using rollers. Another robot heats tissue with a gas burner.

The second technology involves the use of an extruder with the ability to feed carbon fiber filament inside a molten plastic one. For this technology, the presence of a robotic arm is not necessary.

In the article [2], the authors show the benefits of localized flat heat treatment (LITA), which, when being combined with a robotic arm, provides a promising way to make lightweight, high-performance continuous fiber-reinforced thermosetting composites with great design flexibility.

The article [3] show that additive manufacturing (AM), or 3D printing, can be used to make polymer, ceramic, metal, and composite parts with complex geometries using optimized print settings. Fused deposition modeling (FDM) is an extrusion-based 3D printing technology most commonly used to print thermoplastic and fiber composite materials. This method is widely used due to its ease of implementation and low cost and allows the production of parts with both short and continuous fibers. Continuous Carbon Fiber (CCF) is extremely lightweight, tough, and durable, and when used as a reinforcing material, it finds a wide variety of engineering applications. The authors demonstrate research results that combine a short carbon thermoplastic material with CCF to form a continuous carbon fiber-reinforced thermoplastic composite (CCFRTC) using the FDM 3D printing technique.

The third technology involves the creation of products using a spatial interlacing of threads, the ends of which are attached to a frame, and parts of the threads between the ends can be interlaced with each other. This technology can be used, for example, in the production of large elements of prefabricated architectural structures [4], the authors of the article note high strength characteristics of such structures with a low mass, due to the accurate calculation of each element and a differentiated winding scheme for each element.

In the article [5], the authors investigate a heterogeneous system of several robots for spatial winding of filamentary materials. The system is based on the interaction of a six-axis robotic arm and a tuned 2+2 axis CNC gantry system. The heterogeneous interaction of several robots makes it possible to implement a spatial winding strategy: a new method of sequential spatial arrangement of fibers based on direct fixation of thread-thread connections, achieved by winding one thread onto another. This strategy allows the creation of lightweight, irregular fibrous spatial framework structures. The new material system was investigated through physical models and digital simulations prior to deployment using the proposed robot manufacturing process. An adaptable frame design has been developed, that allows parts of various geometries to be produced within a single frame. By introducing a multi-stage curing process that integrates with an adaptable frame, it is possible to iteratively produce continuous large-scale spatial frame structures. This makes the scale of the structure independent of the robot’s working area. Using the capabilities of two interacting machines, the system allows you to neutralize some of their limitations.

The fourth technology is some kind of combination of the three previously discussed. It is performed on a rigid mandrel with subsequent compaction, similar to the first technology, while the product is formed from a single thread or tape of a fixed width (similar to a 3D printer and without a corrugation technology).

The authors of the article [6] demonstrate in their article the possibilities of robotic laying out of complex carbon fiber products. And they show the advantages of the technology compared to manual winding in terms of process control, repeatability, and production time. In this paper, the main attention is paid to a family of parts, the shape of which can be obtained as a result of the movement of a complete section along a closed non-automatically intersecting three-dimensional curve. The authors demonstrate the possibility of obtaining structural homogeneity and uniformity of fiber distribution throughout the entire volume of the product.

The authors of the article [7] note the widespread adoption of robotic automatic fiber placement (RAFP) technology in the production of both large expensive aircraft structures and inexpensive parts. At the same time, it is said about reducing the number of rejects, including in the production of parts with precise contours. The authors demonstrate the potential for optimizing product structural performance by planning yarn paths, such as increasing maximum buckling load and minimizing stress concentrations. At the same time, RAFP introduces inadvertent manufacturing defects, which can include overlaps and gaps and they lead to non-uniform thickness of the structural panels. The authors consider adjustable fiber paths to maximize flexural loads in RAFP panels with explicit consideration of manufacturing defects. A new fiber path modeling method is presented that can explicitly simulate each stacking stroke, including production artifacts in the width of the section, allowable curvature of the bundle, and control of unintentional production deviations that can lead to gaps and overlaps. To obtain optimal solutions, a surrogate modeling method based on machine learning is used in combination with a genetic algorithm.

In the article [8], the authors discuss the issue of calculating the trajectory of the working body of an industrial robot in the production of composites. At the same time, a mandrel attached to the flange of the robot is pulled through a stationary head, which feeds several strands of carbon fiber. The orientation and placement of the carbon fiber strands depend on the trajectory of the robot. A model for the passage of a polyurethane mandrel through a head for feeding carbon fiber is described in the article. To calculate the trajectory of the working body of the robot and determine the desired passage of the mandrel, matrix calculations are used. The required matrices of rotation and displacement of the local coordinate system of the working body of the robot relative to the base system are gradually calculated, and then the Euler rotation angles corresponding to the transformation matrices are determined.

In the article [9], the authors investigate geodetic winding by an industrial robot with six degrees of freedom. The change in parameters caused by the shape of the envelope, the length of the hanging thread, and the geodesic winding is considered, and the resulting effect on the kinetic stability of the robot elbow winding is analyzed. An experiment with the rotation of a dry fiber from a composite elbow shows that the developed winding trajectory of the composite elbow can stabilize the structure of the windings; in addition, yarn slippage, overhead, and other problems develop. The robot’s movement is smooth. The required space of the rotation path of the robot’s elbow corresponds to the simulation workspace.

The authors of [10] investigate the challenges of using multiple Autonomous Industrial Robots (AIR) instead of one AIR to stack carbon fiber on a rigid mandrel. These problems include the optimal division and distribution of work among robots on all layers, as well as the execution of coordinated movement planning, taking into account the requirements and constraints of the layout workflow. To address these issues, this article proposes a two-step approach. The first step looks at several tasks to optimally allocate surface areas for each AIR, and the second step focuses on creating coordinated routes for the AIR. At each stage, mathematical models are developed with several unique challenges and constraints associated with collocating fibers with multiple AIRs. Nevertheless, the operation of AIRs at a sufficient distance from each other is discussed in the article, as a result, their working areas practically do not intersect, which greatly simplifies the task of avoiding collisions.

In the article [11], the results of creating an adaptive system based on an industrial robotic arm are presented. The authors solve two main problems: first, each fiber requires compaction with a certain force, depending on the material used; secondly, the use of offline programming of the robot path results in poor belt placement accuracy. The proposed approach to solving the problem of accuracy and production constraints is an interactive production scheme based on the circuits of exteroceptive sensors. This article shows an interactive manufacturing approach based on a servo amplifier to control the compaction force and visual servo control to control the lateral position of the belt in order to improve the accuracy of fiber placement and then the quality of the manufactured parts. Unfortunately, the authors do not demonstrate the operation of their system on curved surfaces.

However, during the RFP process, a number of characteristic defects may arise [Review of image segmentation techniques for layup defect detection in the Automated Fiber Placement process]: wrinkles (or folds), tape twisting, gaps, overlays, inclusion of foreign materials. Identifying and recognizing defects can take up to 50% of the production time. Moreover, the accuracy of quality control is highly dependent on the qualifications of the inspector.

Due to the complexity and variety of existing carbon fiber stacking technologies, the availability of commercial CAM toolpath programming systems is also very limited.

Coriolis Composites Technologies offers a hardware and software complex that includes an industrial robot with an actuator of its own production, as well as software for modeling the automated laying of a composite tape CADFiber and CATFiber.

Siemens offers its FiberSim open-architecture software product for the development of carbon composite products with the ability to determine the mechanical properties of these products and control robotic manipulators. At the same time, the software product can be used to implement the concept of digital twins.

The quality of the laying, as well as the properties of the future product, depend on many factors (the quality of the feedstock and its composition, the modes of heat treatment, the degree of compaction, the reinforcement scheme, the shape and quality of the mandrel, etc.). It is not always possible to take into account all these factors and technologies in one software product, therefore the presented products are not able to fully satisfy all the requirements. In this article, the authors propose their methods for solving several important problems of automated laying out of composite products with carbon fiber on a rigid mandrel using robotic manipulators, namely:

  • Generation of laying trajectories along geodetic lines on the surface of a rigid mandrel (the surface of an elliptical paraboloid is considered);

  • Correction of the generated geodetic trajectories, taking into account the actual position and orientation of the mandrel relative to the robot;

  • Solution of the problem of inverse kinematics for the robotic arm in order to control the position of the robot in the process of laying carbon fiber based on the proposed method of vectors.

2 Automated synthesis of the stacking trajectory based on geodesic curves

Various lines generated on the base surface of the mandrel can be used as stacking paths. One of these options is the use of a flat template parallel to the XY plane (red lines in Fig. 1), in which the stacking scheme in the first layer is a set of parallel straight lines located along one of the coordinate axes (along X) with an equal pitch. The lines of the flat pattern are projected along the Z-axis onto the parabolic surface of the 3D model, resulting in the trajectories of laying the carbon fiber (green lines). In the second layer, the lines are located perpendicular to the previous layer (along Y) and are also projected onto the mandrel surface. If necessary, you can generate several such layers, alternating the direction of the lines (see Fig. 1a).

Fig. 1
figure 1

The trajectory of the calculation based on the projection of a flat template onto a parabolic surface

Another option for laying is along the curved axes of a parabolic surface. The direction of the lines of one layer is radial (Fig. 2a), and the direction of the second layer is in the form of circular arcs with centers lying on the axis of the parabolic surface (Fig. 2b).

Fig. 2
figure 2

Trajectory of calculation based on curvilinear coordinates parabolic surface

Each of these methods has disadvantages. Due to the projection of a flat template onto a curved surface (Fig. 1), the lines are distorted, as a result, the step between adjacent lines becomes uneven and depends on the angle between the tangent plane and the horizontal plane of the template (the smaller the angle, the less is the distortion), and the laid tape. As a result of these distortions, carbon fiber has multidirectional stress states, which can lead to laying defects in the form of folds, bends, and slippage of the tape. At the same time, the scheme of the first layer shown in Fig. 2a has an additional disadvantage in the form of uneven packing density in the area closer to the center of the paraboloid and on its periphery.

In order to minimize the number of defects in the form of folds, creases, overlaps, and slippage of the thread during laying and to ensure uniform tension inside a thin-walled power shell product with a minimum mass, reinforcement (layout) should be used along geodesic curves.

For a number of surfaces, given parametrically, the equations of geodesic curves can be determined explicitly by solving the system of Euler-Lagrange equations [12]. Consider the solution to the problem for an elliptic paraboloid given parametrically:

$$\begin{aligned} \begin{aligned} X(u(t),v(t))= \left[ a\cdot u(t)\cdot cos(v(t));\ a\cdot u(t)\cdot sin(v(t));\ u^2(t)\right] \\ u-c^2=u(1+4c^2)\cdot {sin}^2(v-2c\cdot ln\left[ k\ (2\sqrt{u-c^2}+\sqrt{4u+1})\right] ) \end{aligned} \end{aligned}$$
(1)

This problem was solved for an elliptical paraboloid with a = 1 [12], and does not allow to arbitrarily specify a surface point through which a geodesic curve would pass (for example, on paraboloid sector boundary) see Fig. 3. The numerical method for determining geodesics is preferable since it allows you to obtain a universal method for solving any smooth surfaces.

In the article [12], a numerical method for calculating geodesics on parametric surfaces is proposed, which reduces to the formation of a system of ordinary differential equations and their numerical solution. where, u = u (t), v = v (t) are parametric functions that determine coordinates on a smooth surface. For a paraboloid:

Fig. 3
figure 3

Using an analytical solution for calculating geodesics

Fig. 4
figure 4

A set of geodesic lines on an elliptical paraboloid

u is the radius of a circle on a paraboloid with a center lying on the axis of rotation;

v is the angle of rotation on the paraboloid, measured in the xy plane from the ox axis;

a is the coefficient that determines the curvature of the parabolic surface.

In the article [13], it is shown that the system of differential equations describing geodesic curves on parametric surfaces has the form

$$\begin{aligned} u''+\frac{\frac{\partial E(u,v)}{\partial u}}{2E(u,v)}{u'}^2+\frac{\frac{\partial E(u,v)}{\partial v}}{E(u,v)}u'v'-\frac{\frac{\partial G(u,v)}{\partial u}}{2E(u,v)}{v'}^2=0 \nonumber \\ v''-\frac{\frac{\partial E(u,v)}{\partial v}}{2G(u,v)}{u'}^2+\frac{\frac{\partial G(u,v)}{\partial u}}{G(u,v)}u'v'+\frac{\frac{\partial G(u,v)}{\partial v}}{2G(u,v)}{v'}^2=0 \end{aligned}$$
(2)

where the functions E(u,v), F(u,v), G(u,v),

$$\begin{aligned} E(u,v)=\frac{\partial X(u,v)}{\partial u}\cdot \frac{\partial X(u,v)}{\partial u} \nonumber \\ F(u,v)=\frac{\partial X(u,v)}{\partial u}\cdot \frac{\partial X(u,v)}{\partial v} \nonumber \\ G(u,v)=\frac{\partial X(u,v)}{\partial v}\cdot \frac{\partial X(u,v)}{\partial v} \end{aligned}$$
(3)

The partial derivatives of the vector function X(u,v) are defined by the following formulas:

$$\begin{aligned} \frac{\partial X(u,v)}{\partial u}=\left[ a\cdot cos(v);\ a\cdot sin(v);\ 2u(t)\right] \nonumber \\ \frac{\partial X(u,v)}{\partial v}=\left[ -a\cdot u\cdot sin(v);\ a\cdot u\cdot cos(v);\ 0 \right] \end{aligned}$$
(4)

then the functions E(u,v), F(u,v), G(u,v) are:

$$\begin{aligned} E(u,v)=a^2+4u^2\nonumber \\ F(u,v)=0\nonumber \\ G(u,v)=a^2\cdot u^2 \end{aligned}$$
(5)

Finally, the system of differential equations defining geodesic lines for an elliptic paraboloid has the form:

$$\begin{aligned} u''-u\cdot {v'}^2+\frac{4u^3\cdot {v'}^2+4u\cdot {u'}^2}{a^2+4u^2}=0 \nonumber \\ v''+\frac{2u'\cdot v'}{u}=0 \end{aligned}$$
(6)

To solve the above-described system, it is required to set the following initial conditions:

$$\begin{aligned} u(0)\ =\ C_1 \nonumber \\ v(0)\ =\ C_2 \nonumber \\ u'(0)\ =\ C_3 \nonumber \\ v'(0)\ =\ C_4 \end{aligned}$$
(7)

where \(C_1\), \(C_2\) - curvilinear coordinates of the starting point of the geodetic; \(C_3\), \(C_4\) - initial radial and derivative of the geodesic. A variety of initial conditions define the family of geodesics (Fig. 4). To exclude defects in the laying of the fiber tape in the layer, such as: folds; uneven product thickness, gaps; it is proposed to search for such a set of geodesic curves, the minimum distance between the points of which is a given constant, in other words, the curves are equidistant.

Fig. 5
figure 5

Components of the objective function on a parabolic surface

It is proposed to solve the problem in the optimization setting. The optimization parameters are the initial parameters of the system of differential equations described above. The objective function is:

$$\begin{aligned} f=\begin{vmatrix}d_{max}-d_{min}\end{vmatrix}+\begin{vmatrix}d_{max}-d_{t}\end{vmatrix} \end{aligned}$$
(8)

where \(d_{max}\), \(d_{min}\) are the maximum and minimum distance between adjacent geodesic curves, \(d_{t}\) is the specified distance between the geodesics (the width of the composite tape, see Fig. 5).

Fig. 6
figure 6

Algorithm for calculating a family of equidistant geodesics based on the optimization algorithm

Fig. 7
figure 7

Error in determining equidistant geodesic

Fig. 8
figure 8

Optimal distribution of geodesic lines on the surface of an elliptical paraboloid

The optimal coverage of the surface by the tape is obtained as a result of the implementation of the iterative algorithm: the position of the edge of the first tape (initial conditions in the solution of the system of differential equations) and its width are set; the optimization problem is solved to determine the parameters of the adjacent tape; the process continues until it goes beyond the surface boundary (Fig. 6). The pseudo code is presented below:

figure a
Fig. 9
figure 9

Maximum and minimum distance between adjacent geodetic lines

Numerical models implemented in the algorithm for calculating equidistant geodesic curves have the following parameters: integration step; the number of iterations of the optimization process; the number of points into which the spline is split (interpolating the geodesic), for the subsequent calculation of the minimum distance; initial values of the system of differential equations. With an arbitrary choice of the listed parameters, the solution turns out to be unstable (Fig. 7).

To obtain a cloud of trajectory points that provide the required accuracy, the integration step of the system of differential equations must be correlated with the speed of the geodesic curve. The case of the optimal distribution of geodesic lines on the surface of an elliptic paraboloid satisfying the initial conditions is shown in Fig. 8

The value of the maximum and minimum distances between adjacent geodetic lines is shown in Fig. 9. At a given tape width of 20 mm and a maximum laying length of 250 mm, there are no gaps between the tapes, and the overlap is no more than 1.8 mm.

The velocity modulus of the obtained family of equidistant geodesic curves changes linearly with distance from the paraboloid axis (determination coefficient \(R^{2} = 0.99\), Fig. 10).

Fig. 10
figure 10

Velocity module of the family of geodetsc

In this case, the angular component of the velocity also obeys a linear law (Fig. 11).

Fig. 11
figure 11

Graphs of changes in radial and angular velocities of geodesic

On the basis of the developed numerical algorithms, the fundamental possibility of calculating an elliptic paraboloid by equidistant geodesic curves is shown in the figure.

3 Solution of the inverse kinematics problem with limited degrees of freedom

Having determined the coordinates of geodesic lines on the surface of an elliptical paraboloid, corresponding to the trajectory of the actuator, it is necessary to solve the inverse kinematics problem to find the values of all six axes of the robotic arm, taking into account their maximum permissible values.

In traditional six-link robots, the position and orientation of the end-effector will be determined by the tool coordinate system, which can be uniquely specified by 6 coordinates: X, Y, Z - position and A, B, C - orientation angles in space relative to the base of the part. In this case, we will assume that the Z axis of the tool will be directed along the carbon fiber coming out of the executive device.

The method of describing kinematics proposed in the article [14] can be generalized in such a way that the arguments are the angles of rotation of the drives, and the parameters are the lengths of the links and the orientation of the axes of the drives. Consider the problem being solved, using the example of the KUKA KR6 R900 robot. The position shown in Fig. 12 will be taken as the initial one.

Fig. 12
figure 12

Geometrical parameters of the KUKA KR6 robot

Fig. 13
figure 13

Position of the KUKA KR6 R900 robot for an arbitrary trajectory

Fig. 14
figure 14

Normal operation of the algorithm (a), hitting the “ravine” (b) gradient methods can be used to overcome “gully” sections of functions

Vectors describing the links of the robot and connecting the axes of rotation Vectors for the KUKA KR6 R900 robot:

$$\begin{aligned} v_{01}=\left[ 0;\ 0;\ 0\right] \ \nonumber \\ v_{12}=\left[ 25;\ 0;\ 400\right] \nonumber \\ v_{23}=\left[ 0;\ 0;\ 455\right] \nonumber \\ v_{34}=\left[ 0;\ 0;\ 35\right] \nonumber \\ v_{45}=\left[ 420;\ 0;\ 0\right] \nonumber \\ v_{56}=\left[ 80;\ 0;\ 0\right] \end{aligned}$$
(9)

and, accordingly, the directions of the rotation axes of the robot links are as follows:

$$\begin{aligned} a_1=\left[ 0;\ 0;\ -1\right] \nonumber \\ a_2=\left[ 0;\ 1;\ 0\right] \nonumber \\ a_3=\left[ 0;\ 1;\ 0\right] \nonumber \\ a_4=\left[ -1;\ 0;\ 0\right] \nonumber \\ a_5=\left[ 0;\ 1;\ 0\right] \nonumber \\ a_6=\left[ -1;\ 0;\ 0\right] \end{aligned}$$
(10)

in this case, the initial values of the rotation angles of the robot links are as follows:

$$\begin{aligned} \alpha _1=0\nonumber \\ \alpha _2=-90^\circ \nonumber \\ \alpha _3=90^\circ \nonumber \\ \alpha _4=0 \nonumber \\ \alpha _5=0 \nonumber \\ \alpha _6=0 \end{aligned}$$
(11)

The position and orientation of the working point of the tool relative to the flange are described at the initial position of the robot by the vector vt, and the vectors of the normal vn and tangent v\(\tau \) directions:

$$\begin{aligned} v_t=\left[ 80;\ 0;\ 0\right] \ \nonumber \\ v_n=\left[ -1;\ 0;\ 0\right] \ \nonumber \\ v_\tau =\left[ 0;\ 0;\ 1\right] \ \end{aligned}$$
(12)

Using the function of the rotation matrix \(R=R(a,\alpha )\) through the angle \(\alpha \) with respect to an arbitrary vector a, the following sequence of calculations was obtained:

$$\begin{aligned} R(a,\alpha ) =\left[ \begin{array}{ccc} {\cos (\alpha ) +(1-\cos (\alpha ))(a _{0})^2 }&{}{(1-cos(\alpha )) a _{0}t a _{1}-sin(\alpha ) a _{2}}&{}{(1-cos(\alpha )) a _{0} a _{2}+sin(\alpha ) a _{1}} \\ {(1-cos(\alpha )) a _{1} a _{0}+sin(\alpha ) a _{2}} &{} {\cos (\alpha ) +(1-\cos (\alpha ))(a _{1})^2 } &{} {(1-cos(\alpha )) a _{1} a _{2}-sin(\alpha ) a _{0}} \\ {(1-cos(\alpha )) a _{2} a _{0}-sin(\alpha ) a _{1}} &{} {(1-cos(\alpha )) a _{2} a _{1}+sin(\alpha ) a _{0}} &{} {\cos (\alpha ) +(1-\cos (\alpha ))(a _{2})^2 } \end{array}\right] \end{aligned}$$
(13)

\(T= R(a_1,\alpha _1\)) - rotation matrix about axis 1

r\(_{12}\)= T\(\cdot v_{12}\) - position of axis 2

\(a_2\)= T\(\cdot a_2\) - drive axis orientation 2

\(T= R(a_2,\alpha _2)\cdot T\) - rotation matrix about axis 2

\(r_{13}\)= T\(\cdot v_{23} + r_{12}\) - position of axis 3

\(a_3= T\cdot a_3\) - drive axis orientation 3

\(T= R(a_3,\alpha _3)\cdot T\) - rotation matrix about axis 3

\(r_{14}= T\cdot v_{34} + r_{13}\) - position of axis 4

\(a_4= T\cdot a_4\) - drive axis orientation 4

T= R(\(a_4,\alpha _4)\cdot \)T - rotation matrix about axis 4

\(r_{15}= T\cdot v_{45} + r_{14}\) - axis position 5

\(a_5= T\cdot a_5\) - drive axis orientation 5

\(T= R(a_5,\alpha _5)\cdot T\) - rotation matrix about axis 5

\(r_{16}= T\cdot v_{56} + r_{16}\) - axis position 6

\(a_6= T\cdot a_6\) - orientation of axis 6

\(T= R(a_6,\alpha _6)\cdot T\) - rotation matrix about axis 6

\(r_t=T\cdot v_t+r_{16}\) - position of the working point of the tool

\(v_n=T\cdot v_n\) - tool normal vector orientation

\(v_\tau =T\cdot v_\tau \) - tool tangent vector orientation

By performing calculations sequentially, it is possible to determine the positions of all robot links corresponding to the rotation angles of its drives (Fig. 13). At the same time, in comparison with the common method for describing the kinematics of robotic manipulators (the Denavit-Hartenberg method), the proposed method does not require the use of multiple coordinate systems for each link of the robot, which reduces the possibility of errors.

When solving the problem of direct and inverse kinematics, one should take into account the existing restrictions on the values of the axial angles of the robot:

$$\begin{aligned} \theta _i-{\theta max}_i\le 0 \nonumber \\ {\theta min}_i-\theta _i\le 0 \end{aligned}$$
(14)

Therefore, the inverse kinematics problem can be considered as an optimization problem with constraints. At the same time, the objective function is the distance between the tool and the current path point.

Fig. 15
figure 15

Overcoming the “ravine” of the function by the gradient method

Fig. 16
figure 16

Movement of a two-link robot-manipulator along a trajectory given by a straight line

One of the simplest ways to impose restrictions in the form of inequalities on variables is to solve the problem of minimizing a function on a given segment, one of the symmetric methods (the method of dividing the segment in half, the golden section method, the tangent method, etc.). To apply the symmetric method for multi-parameter optimization, the coordinate-wise descent method is used.

Fig. 17
figure 17

Movement of a two-link robotic arm along a trajectory set by an arc

It is known that for a number of functions, the coordinate-wise descent method does not even lead to a local minimum. According to the theorem on the convergence of the method of coordinate descent, for the convergence of the method from a given initial approximation, inequalities corresponding to the positive definiteness of the quadratic form must be satisfied. So, for example, the initial approximation can lead to a “ravine” point that is not a global minimum, but hindering further search for a solution (Figs. 14 and 15).

In order to test the proposed algorithm for solving the inverse kinematics problem with constraints, a two-link plane robot manipulator with two degrees of freedom is considered. The trajectory of the tool movement can be specified by a parametric straight line or an arc, as an example, consider them on a plane (Figs. 16 and 17):

$$\begin{aligned} \textrm{p}\left( t,x_0,x_1,y_0,y_1\right) =\left[ \begin{array}{c} \left( x_1-x_0\right) t+x_0 \\ \left( y_1-y_0\right) t+y_0 \\ 0 \end{array} \right] \nonumber \\ \textrm{p}\left( t,x_0,x_1,y_0,y_1\right) =\left[ \begin{array}{c} 2{\cos \left( t\pi \right) \ }-1 \\ 2{\sin (t\pi )\ } \\ 0 \end{array} \right] \end{aligned}$$
(15)

The use of the symmetric method does not allow the use of a more stringent constraint, such as applying a tool in a given area. To solve this problem, the task of conditional optimization can be reduced to the problem of unconditional optimization using Lagrange multipliers, but the number of constraints will increase the dimension of the system of equations being solved.

In addition, it is necessary to ensure the fulfillment of the Lagrange principle, according to which three conditions are fulfilled at the point of the local minimum:

\({L'}_x(a,\lambda )=0\) - stationarity condition;

\({\lambda }_j (a) = 0\) - complementary slackness condition;

\({\lambda }_0 \ge 0\) - the condition for the agreement of signs.

\({L'}_x(a,\lambda )\) - is the derivative of the Lagrange function with respect to the variable x: a is the conditional extremum point; \(\lambda \) is the vector of Lagrange multipliers.

In the analytical solution of the optimization problem using the method of indefinite Lagrange multipliers, all possible solutions are analyzed and the fulfillment of the local minimum conditions is monitored. However, with an increase in the number of degrees of freedom, and the numerical solution of systems of nonlinear algebraic equations, such an analysis is difficult.

Thus, the numerical symmetric optimization method in the context of the problem being solved is preferable, and it was extended to calculate the rotation angles of a robot with six degrees of freedom.

Fig. 18
figure 18

Model of a rig with a stacking trajectory

In Fig. 18, a model of a robot and a mandrel with a surface for constructing the trajectories of the tape in the form of an elliptical paraboloid is shown. The red lines correspond to the trajectories of the actuator and were calculated as equidistant geodesics, with a constant surface step. The blue lines are the wrist paths that define the orientation of the tool normal to the parabolic surface.

Fig. 19
figure 19

Points for determining the positioning error of the rig

4 Correction of geodesic lines taking into account the basing error

It is impossible to repeat exactly the model of the entire system “robot-tool-table” in reality, there is always an error in the position and orientation of the stationary mandrel and the working body of the robot relative to the original coordinate system. For a rigid mandrel, with respect to the basic coordinate system of the robot; for an executive element, with respect to the mounting flange of the sixth axis of the robot.

Table 1 Reference points coordinates

Since in most cases, the control program for the robot uses the Cartesian Coordinates X, Y, Z and the orientation angles A, B, C (FRAME format) to move the tool relative to the work coordinate system of the workpiece (fixture), it is enough to simply measure the position and orientation of the fixture relative to the base coordinate system of the robot. and the tool relative to the flange of the robot. The obtained data are entered into the robot control system and taken into account when solving the inverse kinematics of the robot, while the coordinates in the control program itself are not corrected in any way and the robot independently finds values for all six axes already taking into account the actually measured errors.

Fig. 20
figure 20

3D model and robot KUKA KR6 R900 moving along geodesic lines of a parabolic surface

However, the use of coordinates in the FRAME format in the control program does not allow controlling the movements of all moving elements of the robot and eliminating their collisions or predicting behavior when passing singularity points, since, in this case, the solution of the inverse kinematics problem will be performed by the mathematical apparatus of the control system, which is closed to the user.

Therefore, in order to take this error into account when specifying the coordinates of the points through the values of the rotary axes of the robot, it is necessary to correct the coordinates of the previously calculated points of the geodesic lines, taking into account the measured actual position of the technological equipment and the tool.

Correction of the trajectory of the control program is performed by multiplying the coordinates of each point of the trajectory by the transformation matrix:

$$\begin{aligned} \left( \begin{array}{cccc} a_1 &{} b_1 &{} c_1 &{} d_x \\ a_2 &{} b_2 &{} c_2 &{} d_y \\ a_3 &{} b_3 &{} c_3 &{} d_z \\ 0 &{} 0 &{} 0 &{} 1\end{array} \right) \left( \begin{array}{c} \ \ x^M_i\ \\ y^M_i \\ z^M_i \\ 1 \\ \end{array} \right) =\left( \begin{array}{c} \ \ x^C_i\ \\ y^C_i \\ z^C_i \\ 1 \\ \end{array} \right) \end{aligned}$$
(16)

where \(a_{1}, a_{2}, a_{3}, {b}_{1}, {b}_{2}, {b}_{3 }, {c}_{1}, {c}_{2}, {c}_{3}\) are transformation matrix parameters describing the spatial orientation of the rig relative to the robot;

\({d}_{x}\), \({d}_{y}\), \({d}_{z}\) - parameters of the transformation matrix describing the displacement between the coordinates of the points of the geometric model and those measured in reality;

\({x^{M}_{i }, y^{M}_{i }, z^{M}_{i} }\)- coordinates of points from the geometric model;

\({x^{C}_{i }, y^{C}_{i }, z^{C}_{i } }\)- corrected coordinates of points;

The parameters of the matrix are determined by solving the systems of linear algebraic equations, which includes the coordinates of the control points of the geometric model (\({x^{M}_{i }, y^{M}_{i }, z^{M}_{i } }\)) and measured in reality (\({x^{R}_{i }, y^{R}_{i }, z^{R}_{i } }\)).

$$\begin{aligned} \left( \begin{array}{cccc} a_1 &{} b_1 &{} c_1 &{} d_x \\ a_2 &{} b_2 &{} c_2 &{} d_y \\ a_3 &{} b_3 &{} c_3 &{} d_z \\ 0 &{} 0 &{} 0 &{} 1\end{array} \right) \left( \begin{array}{c} \ \ x^M_i\ \\ y^M_i \\ z^M_i \\ 1 \\ \end{array} \right) -\left( \begin{array}{c} \ \ x^C_i\ \\ y^C_i \\ z^C_i \\ 1 \\ \end{array} \right) =0 \end{aligned}$$
(17)

To determine the 12 unknown transformation matrix, 12 equations are needed, and therefore the three-dimensional coordinates of the four points. Three control points are shown in Fig. 19, the coordinates of the fourth are given as the geometric center of three control points (the values of the points are presented in Table 1).

Table 2 Coordinates of the first ten points of the first geodesic line

Taking into account the actual position and orientation of the rig according to the measured control points, one can proceed to the next stage—calculating the values of the rotary axes of the robot corresponding to the Cartesian coordinates of the geodesic line points.

5 Checking the developed algorithms on a robot KUKA KR6 R900

The developed algorithms for constructing a group of equidistant geodesic lines on a parabolic surface, and their subsequent correction, taking into account the actual position of the mandrel relative to the robot base, as well as determining the values of the rotary axes of the robot, were tested on a KUKA KR6 R900 robot. To check these algorithms, a marker was installed on the robot, for which the trajectories of movement along the parabolic surface of the mandrel were programmed.

Figure 20 shows a 3D model and a robot in the process of moving along the trajectories of the calculation. The coordinates of the first ten points of the actuator and the wrist joint, as well as the actual deviations of these points from the programmed values, are shown in Table 2.

Tables 2 and 3 show the values of the axial angles for the same ten points of geodesic lines.

Table 3 Values of axial angles for the first ten points of geodesic lines

Figure 21 shows a graph of changes in the values of the angular axes of the robot when moving along the first three geodesic curves of a parabolic surface. The graph clearly shows three sections with a smooth change in the angular axes, while each section ends with a transition to the beginning of the next geodesic line. Due to the presence of an algorithm for correcting the coordinates of points, taking into account the actual position and orientation of the rig relative to the robot, it is possible to obtain a drawing of all lines on a parabolic surface (Fig. 22).

Fig. 21
figure 21

Values of the angular axes of the robot when passing the first three geodesic curves

Also along the generated trajectories, a control program was obtained on the bases of generated trajectories, which were obtained on the basis of the flat patterns shown in Fig. 1, in which, using the developed algorithms, the Cartesian coordinates were corrected taking into account the actual position and orientation of the mandrel and converted into the values of the rotary axes of the robot. Figure 23 shows the final pattern on the mandrel surface, on which a trajectory defect is observed closer to the left side, resulting from the reorientation of the fourth axis during movement along the line. This reorientation can also be seen in the graph in Fig. 24, showing the changes in the values of the rotary axes of the robot at the start of the movement. Unfortunately, this defect arises due to the non-optimal location of the tooling in the working space of the robot, therefore, for a given trajectory, it is not possible to calculate the sequence of coordinates without this reorientation. In the future, it is planned to modify the program for calculating the trajectories to select the working area, excluding the reorientation of the working mechanism in the process of laying out.

Fig. 22
figure 22

The result of drawing geodesic lines on a parabolic surface

Fig. 23
figure 23

Drawing trajectories from the projections of a flat template onto a parabolic surface

Fig. 24
figure 24

Part of the values of the rotary axes of the robot when passing along the projections straight lines on the surface of the paraboloid

Thus, it was experimentally possible to confirm the performance of the complex of the proposed algorithms. Additionally, it was possible to check the algorithms for correcting and calculating the rotational coordinates of the robot on the projection trajectory of flat templates.

6 Conclusion

Thus, a complex of algorithms for information support of the technology of robotic automatic laying of carbon fiber on a rigid mandrel was developed. A universal method is presented for the numerical finding of equidistant geodesic curves on curvilinear smooth surfaces according to given parameters (initial curvilinear coordinates, orientation of lines on the surface, and the distance between them). An algorithm for correcting the obtained Cartesian coordinates of the trajectory points was created, taking into account the actual position and orientation of the mandrel relative to the robot. The problem of inverse kinematics was solved taking into account the maximum permissible values of all rotary axes of the robot. The operability of the complex of algorithms was experimentally confirmed using the KUKA KR6 R900 robot (the movement error was less than 5 microns).