Computer Implementation of a Recursion Algorithm for Determining the Tension of a Thread on Technological Equipment Based on the Derived Mathematical Dependences

The current study of computer implementation of the algorithm for determining a thread tension on technological equipment using recursion has established the values of thread tension before a zone where fabric and knitwear form on the technological equipment. It has been proven that the magnitude of thread tension before the formation zone is influenced by the number of guides in each particular technological machine, the curvature radius of each guide, the angle at which a thread wraps the guide, the angle of a thread’s radial wrap, the thread’s physical-mechanical and structural characteristics. The values of the angles at which a thread wraps the guides and the radial angles at which a thread is wrapped by the surface of a guide are defined by the geometric parameters and the design of both the thread feed system on technological equipment and specific guides. As a result, it has become possible at the initial stage of designing a technological process to determine thread tension before the formation zone, depending on the equipment geometric and structural parameters and the thread physical-mechanical and structural characteristics. The difference of 2–6 % between the experimental and calculated values of the tension confirms the correctness of the assumptions made when constructing the model of interaction between the thread and the guide, taking into account its physical, mechanical and structural characteristics, and the possibility of using recursion to sequentially determine the tension in the zones of technological equipment from the entrance zone to the fabrics and knitwear formation zone. Specifically, it has been established that the thread tension increases from a zone to a zone and reaches its maximum before the formation zone. It has been shown that the increase in tension by 9‒15 % leads to a disruption of the technological process and the break of the thread.<br><br>Thus, there is reason to argue about the possibility, at the initial stage of designing the technological process of fabric and knitwear production, to regulate the thread tension before the zone where fabric and knitwear form. This could be achieved by adjusting the geometric parameters and design of both the thread feed system on the technological equipment and specific guides, which would minimize the value of thread tension.


Introduction
Improving the technological processes of the textile industry is associated with the optimization of thread tension before a zone where fabric and knitwear form. Determining the tension before a given zone experimentally causes great difficulties. This makes it impossible to determine the magnitude of tension at the initial stage of designing a techno-logical process of making specific fabrics and knitwear from a particular type of thread. As a result, it is also not possible to improve the shape of the thread feed line, to select the design parameters of the guide elements at the break points of the feed line. Increasing the thread tension before the formation zone leads to its break, which entails stopping the technolo gical machine that hosts thousands of threads.
Under these conditions, significant support is provided by the mathematical modeling of the process of increasing the thread tension in the zones of technological equipment. Its application creates the prerequisites for employing a computational experiment, which is based on the implementation of appropriate algorithms and numerical methods involving modern software and hardware. Its use would make it possible to determine at the initial stage of design the magnitude of technological loads and to improve the shape of a thread feed line in technological equipment, which could reduce the time of the technological process execution and would improve the quality of the resulting articles.
An increase in the thread tension is due to friction forces in the contact area with the guides. The magnitude of friction forces depends on the material of a thread and a guide. Also taken into consideration are the ratios of their geometric sizes, the actual angle at which a thread wraps the guide and the angle of the radial wrap of the thread by the surface of the guide, the physical-mechanical and structural characteristics of a thread, the thread tension before the guide. The consistent passage of a thread over the guides, from an entry zone to the zone of fabric and knitwear formation, leads to a stepped increase in tension. At the same time, the output tension parameter after the preceding guide would be an input parameter for the next guide, which makes it possible to use recursion when determining tension before the formation zone.
In this regard, it is a relevant task to study computer implementation of the algorithm for determining the tension of a thread on technological equipment using recursion.

Literature review and problem statement
Determining the tension of a thread when interacting with the various guides in the loom feed systems was addressed in works [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16]. Paper [4] does not take into consideration the actual physical and mechanical properties of a thread, namely its bending rigidity, the non-linear dependence of friction forces on the magnitude of normal pressure, the actual angle at which a thread wraps the guide, and the angle of the radial wrap of the thread by the surface of the guide. Fig. 1 [4,5] shows the schematics of thread feed on the technological equipment.
The arrows show the break points of a thread feed line on technological equipment. At these points, the thread interacts with the guides. The feed line can be split into zones, each of which would host a single guide.
The effect of the loom settings on the magnitude of the thread's input tension was considered in work [2]. However, the authors do not reveal the mechanism that influences the stepped increase in the tension by the conditions of interaction between a thread and the guides in a loom's thread feed system. Study [3] establishes the effect of thread tension before a working zone on the structural parameters of fabrics for protective clothing, but the reasons for the increase in tension compared to the input tension and the mechanism of their change were not revealed.
Work [4] is interesting; it examines the impact of the tension of the three longitudinal thread systems on the conditions of multi-layered technical fabric formation. They form three independent thread supply systems on the loom, each containing a different number of guides. The given recommendations are narrow and do not make it possible to predict the tension of the formation of multi-layered fabrics when changing their structure. Similar results are reported in study [6] that addressed the processing of cotton threads. The effect of the physical and mechanical properties of cotton threads on the formation conditions of the structure of the canvas is described in paper [7]. However, the cited paper does not provide information about the impact of the design parameters of both the thread feed system and the specific guides on the magnitude of tension before a working zone. The authors of paper [8], when determining the thread tension after the guide, take into consideration the bending rigidity of a thread but determining the magnitude of a wrap angle does not take into consideration a decrease in it due to the effect of this parameter, which does not make it possible to accurately determine the tension after the guide. The issue of determining the thread tension in the presence of a radial wrap of the thread by the surface of the guide was considered in sufficient detail in [5,16]. The authors confine themselves to considering the determination of tension for the various feeder guides of a knitting machine. However, the cited works do not take into consideration the bending rigidity of a thread when determining the actual wrap angles. Similar results were reported in [9] for knitting machines with feeder guides. When determining tension, the authors do not take into consideration the actual conditions of interaction in the contact zone, taking into account the bending rigidity of a thread. The need to account for the relative shift of the rubbing surface of the thread and the guide is paid attention to in work [10]; it is very important in the presence of anisotropy of frictional properties. When determining the thread tension, the authors of paper [11] simulated the process of interaction with a movable rotating guide, whose curvature radius far exceeds the cross-sectional radius of the thread. A given approach cannot be used for the textile and knitting a b Fig. 1. Schematics of thread feed on technological equipment: a -loom; b -circular knitting machine technological processes in which the curvature radius of the guide and the radius of the thread cross-section are commensurate. The experimental determination of thread tension involved a mechanical scheme presented in work [12]. Given the range of change in thread tension and the inertia of individual nodes, it cannot be used to measure the tension of a thread for the feed depth of a technological machine. An improved installation is reported in papers [13,16]. The use of tensometry makes it possible to determine the tension with a sufficient degree of accuracy. However, a given installation cannot be used to determine the impact of the design parameters of guides of complex shape, and the range of change in the angles at which a thread wraps the guide is very limited. When determining the thread tension experimentally, there is a reason to argue about the promising development of redundant measurement methods in different types of transformation function (linear and non-linear) in the field of improving accuracy by processing results from intermediate measurements [14]. The independence of the results of experimental thread tension measurements on the parameters of the transformation function of tensometric devices is confirmed in works [15,16]. Thus, determining the tension before the fabric and knitwear formation zone experimentally is associated with great difficulties. This does not make it possible, at the initial stage of designing a technological process, to obtain specific fabrics and knitwear from a particular type of thread. It is also not possible to determine the magnitude of the tension and, as a result, to improve the shape of a thread feed line, to select the design parameters of the guide elements at the break points of the feed line. Increasing the tension of a thread before the formation zone leads to its break, which entails the shutdown of the technological machine. Currently, there is no mathematical notation of the process of increasing the tension of a thread in the zones of technological equipment. This relates to that the derived dependences received include transcendent equations that can only be solved by using numerical methods and software tools. In addition, when deriving dependences, one should take into consideration that the magnitude of friction forces depends on the material of a thread and a guide. Also taken into consideration are the ratios of their geometric sizes, the actual angle at which a thread wraps the guide and the angle of the radial wrap of the thread by the surface of the guide, the physical-mechanical and structural characteristics of a thread, the tension of a thread before the guide. The consistent passage of a thread through the guides, from the entry zone to the fabric and knitwear formation zone, leads to a stepped increase in tension, but there is no algorithm for determining this magnitude.

The aim and objectives of the study
The aim of this study is to derive mathematical dependences that would make it possible to determine the tension before the fabric and knitwear formation zone based on recursion. This could make it possible to consistently determine the tension in the zones of technological equipment from the entry zone to the zone of fabric and knitwear formation and to improve the shape of a thread feed line, to select the design parameters of the guide elements at points where the feed line breaks.
To accomplish the aim, the following tasks have been set: -to build an algorithm to determine the tension of a thread on the technological equipment before the formation zone, depending on the material of a thread and a guide based on recursion; -to derive a function that relates the tension of a thread before and after the guide taking into consideration the ratio of their geometric size, the angle of the radial wrap of the thread by the surface of the guide; -to study experimentally the effect of the specified factors on the magnitude of tension to assess the correctness of the assumptions made when constructing a model of interaction between a thread and the guide.

1. Simulation methods and examined materials
A computational experiment aimed to implement an algorithm for determining the tension of a thread on technological equipment using recursion involved the application of specially developed software in the Object Pascal programming language in the Delphi 7 environment.
Two types of threads were selected for the experiment: a 0.2 mm polyamide thread with a diameter of 1.09 g/cm 3 , whose breaking stress at the cut is 45 MPa; a polypropylene thread with a diameter 0.2 mm, density 0.9 g/cm 3 , breaking stress at the cut is 40 MPa.

2. Algorithm for determining the thread tension using recursion
The system of equations, which describes a change in tension by zones, takes the form: where Р 0 is the tension of a thread at the input zone to a thread feed system of the technological machine; Р 1 , Р 2 , …, Р i is the tension of a thread when it exits the corresponding zone; are the functions that relate the thread tension before and after the guide in each zone; i is the current zone number; n is the number of guides in the system of thread feed of a particular technological machine. By using a recursive approach to determining the tension of a thread before the fabric and knitwear formation zone, at which the output tension after the guide in the preceding zone is the input value of the tension before the guide in the subsequent zone (Fig. 1), equations (1) are represented in the following form: Note the stepped structure of the algorithm.
Step 1 corresponds to the onset of the algorithm execution. At step 2, constant quantities are set: a, n 1 -constant coefficients for a given type of the thread; B is the bending rigidity factor of a thread; r is the radius of the cross-section of a thread.
The bending rigidity factor of a thread is determined from the formula: where E, I are, respectively, a thread elasticity module for stretching and the moment of inertia of the thread section.
At step 3, one sets the number n of guides in a thread feed system of a particular technological machine, the magnitude of the initial tension P 0 of a thread in the entry zone. In addition, at step 3, for each i-th guide, arrays are formed: for the estimated angles at which a thread wraps the guides j P (i), for the angles of the radial wrap of the thread by the surface of the guide β(i), for the curvature radii of the guides R(i).
At step 4, one selects the first guide.
Step 5 serves to call the subprogram for calculating the roots of transcendent equation f(Р k ) = 0. The fact is that the dependence that relates the tension of a thread before and after the guide is a system of two transcendent equations (4). To determine the root, a Newton's modified method (a tangent method) was used in the current work, which implies that one finds, for the function f(Р k ) = 0, (k = 1, 2, …, n), at each step of the iteration, instead of calculating the derivative from df(P)/d(P), its approximate value: where ε is the assigned error of root calculation. Then the recurrent formula for constructing the iterative dependence {P j } takes the form: Formula (4) was used to calculate the magnitude of tension for the j-th guide.
Step 6 implies moving to the next guide.
Step 7 serves to check the number of the guide with a set number of guides n to the thread feed system of a technological machine. If the condition n i ≥ is met, step 5 is returned. In this case, at step 8, one reassigns P i = P i+1 , where the tension value after the preceding guide is assigned to the tension value before the subsequent guide. In the case the condition n i ≥ is not met, there is a transition to step 9, where the tension of the thread before the fabric or canvas formation zone is registered.
Step 10 corresponds to the end of the algorithm run.

3. Determining the function that relates thread tension before and after the guide
Our analysis of conditions of the interaction between a thread, which is 2r in diameter, and the i-th guide, whose radius is R i (Fig. 2), revealed that it is necessary to consistently determine its tension along sections 0A, AB, and B1. It is quite obvious that at points 0 (the entry branch, which has the tension P i-1 ) and 1 (the output branch, which has the tension P i ) the curvature of the monothread axis is zero. The forces of gravity of the thread can be neglected.
The general system of differential equations in projections onto the axes of a natural trihedron, describing the equilibrium of an infinitesimal element of the thread, takes the form: where P is the thread tension; s is the arc coordinate; K is the curvature of the thread axis; Q is the shear force in the cross-section of the thread; F τ , F n are the projections of ex-ternal forces on the tangent and normal axes of the natural trihedron; M is the bending moment in the thread section; ρ is the curvature radius of the thread axis; j i is the angle of surface wrap between the initial and final cross-sections of the thread section. Given that the external forces do not affect a monothread at sections 0А and В1, it is possible to transform the system of differential equations (5) to the form: The integration of the differential equation system (2), taking into consideration the boundary conditions for points 0, A, B, 1, allowed the following equations to be obtained to determine tension at points A and B: In turn, expressions for determining the force of tension (always directed on a tangent to the axis of the thread) at points A and B can be obtained by parallel transfer of tension vectors  P i−1 ,  P i to points A and B and by decomposing them on the tangent and normal using rigidity angles γ 0i , γ 1i . We then obtain: By solving equations (7) and (8) together, we obtain expressions to determine the angles of rigidity: Thus, the actual angle of the thread's wrap, considering (9), can be determined from the expression: where j Pi is the estimated value of the wrap angle of the i-th guide. Let us proceed to determine the tension of a thread along section AB. At this section, the thread would be exposed to the external forces of friction F and normal pressure N. Let us assume that the force of friction is proportional to normal pressure, and the variable is the magnitude of a friction factor, which depends on the tension, the curvature radius of the guide, the angle at which a thread wraps the guide. Given this, the force of friction, considering the radial wrap of the thread by the surface of the guide, can be represented in the form: Let us consider the equilibrium of the thread element along section AB. Given that the curvature radius of the cylinder R i is a constant magnitude, the lateral force is Q = 0. Then, considering (11), the system of differential equations (5) takes the form: We integrate the last differential equation taking into consideration the boundary conditions at points A and B; we obtain: By solving (7), (10), (14) together, we obtain a system of two transcendental equations regarding the tension of the leading branch of the monothread P 1 : Then the function that relates the thread tension before and after the guide takes the form:

Experimental installation to determine thread tension
To assess the correctness of the assumptions made in the construction of a model of interaction between a thread and a guide, taking into consideration its physical-mechanical and structural characteristics, a series of experimental studies was undertaken involving active planning. Fig. 3 shows an experimental installation that includes 9 units.
The first unit is a thread feed and tension device. To avoid ballooning, the thread from the bobbin was coiled onto a cylindrical drive from which it was fed into the measurement zone. The tension of the driven branch was created with the help of a dish thread tensioner.
The second and third units are designed to measure the tension of the driven and drive branches of thread 9. Depending on the magnitude of the tension of the driven branch of thread 9, two types of measuring nodes were used in our study. The stationary tension meter of a moving thread MT 320M with movable external rollers was used for a tension range from 50 cN to 500 cN. A second type of measuring node was used for a tension range from 1 to 50 cN, which includes two rollers that are mounted in the bearings on the fixed axes. The third roller is mounted on a console-fixed beam so that the inner ring of the bearing is fixed on it, and the outer ring of the bearing is rigidly fixed to a roller interacting with the thread. The 8ANCc-7M amplifier was used to amplify the signal.  The feed rate of thread 9 was changed by a stepped round-belt gear (the fifth unit in Fig. 3). The drive pulley of this gear was set into rotation by an AC engine, which was fastened rigidly on the bed of the main measuring complex.
The analog signals from units 2 and 3 that measure the thread tension (for the first type of the measuring node) or from amplifier 6 (for the second type of the measuring node) arrive at analog-digital converter ADC 7. The ADC is the multifunctional L-780M board with a 14 bit/400 kHz signal processor, which is installed in a PCI socket of personal computer 8.
To determine the joint effect of the tension of the driven branch of the thread P i-1 , the radius of the guide R i and the estimated value of wrap angle j P i on the tension of the drive branch of the thread P i , we planned and implemented an orthogonal plan of the second order for three factors, whose matrix is given in Table 1. The range of factors variance was determined by the actual conditions for processing threads on textile machines. The range of the guide radius variance R i changed from 1 mm to 8.2 mm. Table 1 Matrix of the second-order orthogonal plan No.

Input tension
Curvature radius Wrap angle In this case, The equations that relate the named and encoded magnitudes take the form (17): they were used to move to the named magnitudes in regression equations.

Results of the implementation of the computational experiment and the second-order orthogonal plan to determine thread tension on the technological equipment
In the first stage, to assess the correctness of the assumptions made in constructing the model of interaction between a thread and the guide taking into consideration its physical-mechanical and structural characteristics, we determined the value of thread tension P i after a single guide from formula (15). The Newton modified method (a tangent method) was used to solve the system of two transcendent equations using the recurrent formula (4). The resulting array of discrete values of the tension of the drive branch of thread P i , as a function of the curvature radius of the guide surface R i , was approximated by a power polynomial: where a i are the coefficients of the power polynomial. The result is the derived dependences, for the polyamide thread (at a = 0.17, n 1 = 0.09) and for the polypropylene thread (at a = 0.15, n 1 = 0.09), for various values P i-1 , of the tension P i as a function of the guide radius R i . For the polyamide thread:  Fig. 5 shows, by using symbols, the results of the numerical solution of the system of transcendent equations (15) using the recurrent formula (4), and, by using lines, the corresponding approximation curves (18), (19).
The result of the experiment plan implementation (Table 1) is 10 parallel measurements for each case and each type of the thread, the averages of which are given in Table 2.
By using a known procedure for determining the coefficients in a regression equation for the second-order orthogonal plan, we derived the following regression dependences: -for the polyamide thread:  For comparative analysis, Fig. 6 shows the cross-sections of the derived response surfaces for the polyamide and polypropylene monothreads, represented by dependen ces (20), (21). The analysis showed that as the cylinder radius increa ses, the tension grows. Moreover, for the polypropylene monothread, the growth intensity at the diameter of the cylin der exceeding 2 mm begins to decrease. The lower tension value for the polypropylene monothread is explained by the lower frictional properties of the monothread material itself. Although the bending rigidity module for the polypropylene monothread is lower than that of the polyamide monothread.
By establishing the adequacy of model (15) for the computational experiment, let us move on to the implementation of the algorithm for determining the tension of the thread on the technological equipment using recursion based on dependences (2), (16). Its computer implementation made it possible to determine the thread tension P n before the formation zone on the circular knitting machine PaiLung. The line of a thread feed on the circular knitting machine PaiLung can be conditionally split into 12 sections. The first section is located from the bobbin to the feeder's input hole. The second section is located from the feeder's input hole to the transitional knee. The third section is located from the transitional knee of the feeder to the transitional knee of the feeder. The fourth section is located from the transition knee of the feeder to the thread puck puller. The fifth section is located between the thread's puck puller and the input hole of the thread guide. The sixth section is located from the input hole of the thread guide to the vertical accumulator of the thread of the drum type. The seventh section is located from the vertical thread accumulator to the input hole of the thread guide. The eighth section is located from the input hole of the thread guide to the input hole of the thread guide. The ninth section is located from the input hole of the thread guide to the input hole of the thread break controller. The tenth section is located from the input hole of the thread break controller to the output hole of the thread break controller. Section 11 is located from the original hole of the thread break controller to the input hole of the thread guide. The twelfth section is located from the input hole of the thread guide to the PaiLung knitting zone. Fig. 7 shows the diagram of change in the relative thread tension P n /P 0 across the feed zones of the Pai-Lung circular knitting machine.
By using an algorithm for determining the thread tension on the ATT-120-5M loom using recursion, we have implemented a computational experiment based on dependences (2), (16). Its computer implementation made it possible to determine the tension of the thread before the formation zone on the loom ATT-120-5M.
The line of a thread feed on the loom can be conditionally split into 5 sections.
The first section is located between the bulk and the cylindrical guide. The second section is located between the cylindrical guide and the first guide of the dividing device. The third section is located between the first and last guide of the dividing device. The fourth section is located between the last guide of the dividing device and the opening of the heald frame. The fifth section is located between the opening of the heald frame and a fabric formation zone. Fig. 8 shows the diagram of change in the relative thread tension across the feed zones of the ATT-120-5M loom.  Our analysis of the diagram of change in the relative thread tension across the feed zones of the ATT-120-5M loom (Fig. 8) shows that the tension of the threads increases from zone to zone and reaches its maximum before the fabric formation zone.

Discussion of results of implementing the algorithm for determining thread tension on technological equipment using recursion
The simulation of the process of interaction between a thread and the guide has made it possible to establish that the magnitude of thread tension is affected by the curvature radius of the guide, the angle at which a thread wraps the guide, the angle of the radial wrap of the thread, the physical-mechanical and structural characteristics of the thread. The values of the angles at which a thread wraps the guides and the angles of the radial wrap of the thread by the surface of the guide are determined by the geometric parameters and the design of both the thread feed system on technological equipment and specific guides. It has been established that the tension of the thread before the formation zone is influenced by the number of guides on each particular technological machine. As a result, it has become possible to determine at the initial stage of the design of a technological process the tension of the thread before the formation zone, depending on the geometric and design parameters of the equipment and the physical-mechanical and structural characteristics of the thread.
Our experimental studies have confirmed the correctness of the assumptions made in the construction of a model of interaction between a thread and the guide taking into consideration its physical-mechanical and structural characteristics. Analysis of graphic dependences in Fig. 6, 7 has shown that the difference between experimental dependences and the results of a computational experiment, on average, does not exceed 5 %, which makes it possible to apply dependence (15) not only for qualitative but also for quantitative analysis of the process of interaction between the thread and the guide.
Computer implementation of the algorithm for determining thread tension on the technological equipment using recursion, based on dependences (2) and (16), has made it possible to determine the thread tension P n before the formation zone on the circular knitting machine PaiLung and the thread tension before the formation zone on the loom ATT-120-5M. Analysis of the results obtained has made it possible to establish that the tension of the thread increases from zone to zone and reaches its maximum before the formation zone. It is shown that the excessive value of tension leads to a disruption of the technological process and to the break of the thread. Our study has confirmed the possibility of using recursion in the sequential determination of tension across the zones of technological equipment from the input zone to the fabric and knitwear formation zone.
The current study was conducted for complex threads. To study the conditions of processing monothreads, it is necessary to take into consideration the specificity of their interaction with the guides of large curvature.
It is a promising issue to determine the tension of threads taking into consideration the angles of deviation from the geodesic line at the surface of the guide taking into consideration the anisotropy of friction.