Form-finding of tensegrity structures based on genetic algorithm

We develop a novel form-finding method that utilizes force density and a genetic algorithm. Firstly, the equilibrium equation is derived by using the force density method. Next, the force density matrix is decomposed through QR decomposition. Subsequently, an optimization objective function is introduced, which incorporates information about the force density values. The optimal solution for the objective function is obtained through the use of a genetic algorithm. We determine a suitable set of force density values that satisfy the requirements of the equilibrium matrix rank deficiency, force density rank deficiency, and precision, thereby establishing the equilibrium configuration of the structure. The simulation results verify the reliability of the proposed method. With its advantages of straightforward calculations, rapid convergence, and high precision, this method proves to be well-suited for the form-finding of both regular and irregular tensegrity structures.


Introduction
The concept of "tensegrity" was originally presented by Fuller in the 1960s.Tensegrity structures generally consist of discrete bars and continuous cables, forming a rigid-flexible coupling structure [1].Due to their lightweight nature, strong impact resistance, excellent mechanical properties, and collapsibility, these structures have found applications in fields such as architecture [2], robotics [3], and aerospace [4].Finding the geometric configuration of tensegrity structures, known as form-finding, is crucial in their structural design as they exhibit a self-equilibrium without the presence of external forces.Form-finding involves determining the initial prestress and structure shape.Existing formfinding methods generally consider topological connections as known conditions, with node coordinates and prestress as variables.These methods can be categorized as topological form-finding and prestress form-finding [5].Commonly adopted form-finding strategies include the dynamic relaxation method [6], force density method [7], energy minimum method [8], and intelligent optimization algorithms derived from these approaches.
The force density method, widely applied for its ease of understanding and simplicity of operation, represents a typical form-finding approach.The force density method involves the utilization of the force density coefficient, which expresses the relationship between force and length.The force density matrix is computed by applying the association matrix.It is derived by utilizing an initial set of force density values.The equilibrium matrix is determined by taking into account both the association matrix and the coordinates of nodes within the system.Iterative solutions are used to determine the singular values of the force density matrix.Ultimately, it is possible to obtain the node coordinates and set of force densities that meet the minimum rank-deficiency requirement [5].Both regular and irregular tensegrity structures can be analyzed.However, traditional force density methods encounter challenges when dealing with complex tensegrity structures.To address this issue, intelligent optimization algorithms derived from the force density method have been developed, such as the combination of the force density method based on GA [9], NN [10], and AFSA [11].
In summary, extensive advancements have been made in the study of form-finding methods for tensegrity structures, and the initial form of a tensegrity structure can be quickly obtained.However, for complex tensegrity structures, a combination of intelligent algorithms is required for form-finding.This article introduces an intelligent form-finding method for tensegrity structures.Firstly, the equilibrium equations are established.Then, the force density matrix is subjected to QR decomposition, and an optimization objective function incorporating the force density values is introduced.To achieve the optimal solution for the objective function, we utilize the genetic algorithm in our approach, thereby a suitable set of force densities is determined, which satisfies the rank conditions.As a result, we can ascertain the balanced configuration of the structure.The efficacy of the form-finding method is showcased through illustrative examples.
The structure of this article is organized as follows.Section 2 introduces the self-equilibrium configuration and rank deficiency condition of tensegrity structures.Section 3 provides a detailed explanation of the GA-based form-finding process for tensegrity using QR decomposition.Section 4 shows several examples to demonstrate the effectiveness of this form-finding method.

Assumptions
 The geometric topology and connection relationships of the structure are known. All nodal connections of the individual elements are assumed to be hinged. External loads are not considered in the analysis. The weight of the structure is neglected. The deformation caused by structural bending is neglected. The consideration of dissipative forces' impact on the structural system is omitted.

Self-equilibrium equation of tensegrity structure
The detailed content of force density can be found in [7].For any tensegrity structure with b components and n nodes, the connectivity matrix  can be determined based on the topological connection relationships.It is assumed that Component k is connected between the nodes i and j, and the kth row of the connectivity matrix C will have elements 1 and -1 corresponding to the ith and jth positions, respectively.If the nodes i and j are not connected by Component k, the corresponding element in C will be set to zero.Therefore, the connectivity matrix can be presented as follows: We suppose that the force density of the tensegrity structure is   ,  , … ,  , … ,  .The force density of the member k can be obtained by the following equation.

𝑞
(2 where  is the internal force of the member k, and  is the length of the member k.Therefore, the force density of the whole structure  ∈  can be defined as follows: Combining Equations ( 1) to (3), the equilibrium equations of tensegrity structure in each direction are defined as follows: 0 (5) The force density matrix  ∈  are given in the following equations.

𝑬 𝑪 𝑸𝑪
After rearranging the equations, the equations define the equilibrium of a tensegrity structure as follows: Equations ( 4) to ( 6) can be rearranged to form the force density equations for the tensegrity structure.
0 (9) The tensegrity structure is a self-balancing structure system, so the unbalanced force  is adopted as an index to evaluate the accuracy of the calculation results, which is defined as follows: In this paper, we control design error within  10 .

Two rank deficiency conditions
The solution space, which characterizes the equilibrium equation of a tensegrity structure, can be defined as the null space of matrix E. The rank deficiency of E defines the dimension of the null space. (12) In Equation ( 8), the row or column of matrix E exhibits a summation of elements equal to zero, so Equation ( 8) has at least one eigenvalue of zero, and the corresponding vector  = {1,1, … ,1 is a solution of Equation ( 8), which obviously cannot be used as a coordinate vector of a feasible node.Therefore, the first rank deficiency condition must be satisfied for semi-definite matrix E of Ddimensional tensegrity structure.
The null space of Matrix A captures the entire solution set of Equation ( 9).We define the dimension of matrix A as   , representing the equilibrium matrix, which can be obtained by using the following equation.
where     .The condition for the existence of at least one self-equilibrating mode is expressed as the second rank-deficiency condition.

𝑠 𝑛 𝑨 1 (16)
Based on the above two rank deficiency conditions, the proposed form finder search allows for a self-equilibrium configuration in which at least one self-stress state exists in a tensegrity structure.

QR decomposition
In the preceding section, the equilibrium equations for the tensegrity structure have been derived, and by solving these equations, the null space of the solutions can be obtained.However, Matrix E needs to meet the requirement of having a rank that should be equal to or greater than d+1.In this paper, QR decomposition is used to compute the rank of the force density matrix to satisfy the first rank deficiency condition.QR decomposition decomposes a matrix into the product of two matrices, where one is an orthogonal matrix and the other is an upper triangular matrix, for example, E=QR.The column vectors of Q form an orthonormal basis and satisfy the property of  , where  is the identity matrix.R is an upper triangular matrix with all zero elements below the diagonal and positive diagonal elements.It is an effective method for solving linear systems of equations.
For matrices with arbitrary entries, it is generally not possible to form such a decomposition.This is because before performing QR decomposition, the matrix needs to undergo Schmidt orthogonalization, which requires ensuring the linear independence of the column vectors.However, this issue of linear dependence can be bypassed by using Householder transformations.Householder transformation is an orthogonal transformation capable of converting an arbitrary n-dimensional vector, denoted as Vector a, into any desired n-dimensional vector b.In other words, for any two vectors a and b (,  ∈  and |||| |||| ), it is possible to find a Householder transformation P such that b = Pa.We set    /|| || , and the reflection matrix  can be defined as: where I is the unit matrix.

𝑷 … 𝑷 𝑬 𝑹 (19)
We set   …  , we can obtain: By left-multiplying both sides of Equation ( 20) by  , we can obtain: where  is equivalent to an orthogonal matrix Q, and R is the upper triangular matrix.

Objective function
The rank deficiency of E for tensegrity structures is equal to or greater than d+1.When the tensegrity structure is two-dimensional or three-dimensional, the rank should be n-3 or n-4, respectively.By forcing the elements in the n-3, n-2, and n-1, nth rows in the n-2 and n-1, and nth rows of the upper triangular matrix R to be zero, the rank-deficiency condition for 2D or 3D tensegrity structures can be satisfied.Therefore, according to the mean square error loss function, the objective function is as follows: ,  , ⋯ , where w represents the number of elements in the upper triangular matrix R that need to be set to zero; α is defined as  ∑ ∑  , which represents the mean square deviation between  and 0; β is defined as  ∑ 1/| |, which ensures that each force density value is not close to or not equal to zero, while not affecting the minimization of α;  represents the set of force density;  represents the collection of force densities associated with the cable members;  is the set of force density of bar members;  is the number of members in a group with the same power density value.Equation ( 25) is an optional constraint, and most of the tensegrity structures in engineering applications are symmetric structures, that is, there are one or more groups of members with equal force density values.
GA is a kind of optimization algorithm that simulates the natural evolution process.It has advantages in global search.In this paper, GA is utilized to encode the force density in real numbers, and a series of operations such as selection, crossover, and mutation are carried out to optimize the solution of the objective function step by step.

Form-finding process
The entire geometric programming algorithm proceeds as follows: (1) Initialization: We set the connectivity matrix, specify the design error tolerance, and define the parameters for the genetic algorithm.
(2) Optimization algorithm design: A set of force density values that meet the constraints ( 23) and ( 24) is randomly generated, the force density is encoded as a real number, and the force density value is obtained by selection and crossover and mutation operations, meanwhile Matrix E was formed according to Equation (7).QR decomposition of Matrix E is performed to iteratively get a collection of force densities and minimize the objective function.
(3) Equation system construction: We utilize the connectivity matrix and force densities to construct the equilibrium equation system and the force density equation system.
(4) Evaluation of three conditions: We check if Matrix E satisfies Equation ( 14), verify if Matrix A satisfies Equation ( 16), and evaluate if the error meets the design requirements.If all of these conditions are met, we will output the force density values and nodal coordinates.Otherwise, we proceed to Step (2).

Example
In this section, four numerical cases of regular 3-bar 6-cable, irregular 3-bar 6-cable, regular 6-bar 24cable, and irregular 6-bar 24-cable tensegrity structures are given to confirm the feasibility and effectiveness of the method.The results of the examples show that the method is suitable for both 2D and 3D tensegrity structures, the design error is up to the requirements, and the accuracy is high.The main parameters of GA are set as follows.

A 3-bar 6-cable tensegrity structure
The planar 3-bar 6-cable tensegrity structure consists of 9 members and 6 nodes, with each node connected to 2 cables and 1 bar.Both regular and irregular 3-bar 6-cable tensegrity structures can be determined based on Equation (25).The force density is divided into three groups: the first group consists of rod force density, the second group contains four equal cable force densities, and the third group contains two equal cable force densities, resulting in a regular 3-bar 6-cable tensegrity structure.As shown in Figure 1, it is evident that the objective function rapidly converges from an initial value of 0.0681 to approximate zero, and the objective function value converges to 1.9425e-8 after performing 100 iterations.With an error of 3.0575e-10, the force density values for the bars are -0.4169,among which one group of cables is 0.8338 and the other group of cables is 0.4169.After normalization, the force density of the rod and the two groups of cables are -1, 2, and 1 respectively, which is consistent with the research results in [2] and verifies the validity of our study.Through the coordinate position of each node, we can get the relationship between the length of the rod and the cable, and the designer can design and make the whole tensioning structure according to the length relationship.The structural diagram (Figure 2) can be plotted based on the connectivity matrix and node coordinates, where bold lines indicate bar components (1), and thin lines represent cable components (2).From Figure (2), it can be seen that the structure has a symmetric distribution of bars and cables.The resulting structure is a regular 3-bar 6-cable tensegrity structure.
Figure1.Iterative process for regular 3-bar 6-cable tensegrity structure form-finding.We can obtain an irregular 3-bar 6-cable tensegrity structure without using Equation (25).As shown in Figure 3, the objective function converges quickly, and after 100 iterations, the objective function value converges to 5.1685e-10 with an error of 3.7896e-6.We found that the accuracy of the irregular structure decreases compared to the regular 3-bar 6-cable tensegrity structure due to the different force density values for the bars and cables.However, it still satisfies the rank deficiency condition and can also form a stable structure.The force density values for the bars are  = [-0.1581,-0.3058, -0.3248], and for the cables, they are  = [0.5095,0.8742, 0.7332, 0.3827, 0.1961, 0.4122].By substituting these force density values into Equation ( 8), we can calculate the node coordinates of the tensegrity structure.The structure diagram (Figure 4) is created based on the connectivity matrix and node coordinates, with bold lines representing the bar components (1) and thin lines representing the cable components (2).From Figure 4, we can observe that the lengths of the bars and cables are not equal, forming an irregular tensegrity structure.

A 6-bar 24-cable tensegrity structure
The spatial 6-bar 24-cable tensegrity structure is comprised of 30 units and 12 nodes, with each node connected to 4 cables and 1 bar.This structure is a regular configuration and can be divided into 2 groups of units: one group consists of cable units with equal force densities, and the other group consists of bar units with equal force densities.Real number coding is applied to encode the force densities.As shown in Figure 5, it is evident that the objective function rapidly converges.After 15 iterations, the objective function value reaches 6.94e-09.After 100 iterations, the objective function value decreases to 1.31e-31 with an error of 1.01e-15.The force density value for the bars is -0.5661, and the force density value for the cables is 0.3774.After normalization, the force density of the rods and the cables are -1 and 1.5, respectively, and the consistency between the normalized force densities and the results reported in [2] and [9] further supports the effectiveness of this algorithm.By substituting these force density values into Equation ( 8), the node coordinates of the tensegrity structure can be calculated.Through the coordinate position of each node, we can get the length of the rod and the cable: 0.8659 and 0.5449.We can get the length of the rod as 1.5891 times the length of the cable, and the designer can design and make the entire tension structure according to the length relationship.The structural diagrams (Figure 6) can be plotted based on the connectivity matrix and node coordinates, where bold lines indicate bar components (1) and thin lines represent cable components (2).25) is removed, the resulting 6-bar 24-cable tensegrity structure becomes an irregular shape.If we use the given genetic algorithm with 100 iterations, it may not achieve the desired tensegrity configuration due to the insufficiently small objective function.Therefore, we increase the iteration number to 200 (Figure 7).The results derived from running the entire algorithm vary each time, but all of them produce force densities that meet the rank-deficiency conditions and successfully achieve the desired error.This means that there are many possible shapes for irregular 6-bar 24-cable tensegrity structures, and we randomly choose one for demonstration.As shown in Figure 7, the convergence speed of the objective function is fast, and the resulting objective function is 3.9285e-09 with an error of 8.4033e-6.The force density for bars is  = [-0.6243,-0.6194, -0.6744, -0.5318, -0.7408, -0.6771], and the force density for cables is  = [0.2535,0.5536, 0.6140, 0.6223, 0.4070, 0.7004, 0.5398, 0.7585, 0.4552, 0.7698, 0.5557, 0.5907, 0.3704, 0.6210, 0.2303, 0.3106, 0.4608, 0.6407, 0.2365, 0.3852, 0.4104, 0.2227, 0.5726, 0.6059].Similarly, we can find the coordinates of each node by Equation ( 8) based on the obtained rod and cable force density value.Based on these node coordinates, we can plot the structure diagram.The irregular 6-bar 24-cable tensegrity structure is depicted in Figure 8, where bold lines indicate bar components (1) and thin lines represent cable components (2).In Figure 8, we can see that the lengths of each rod and cable are not consistent, so this is an irregular tensegrity structure.

Conclusion
Tensegrity structures have the advantages of being lightweight and shock-resistant.They thus have found extensive application in the domains of biomimetics, aerospace technology, and material science.Recently, biomimetic legged robots and space exploration robots based on tensegrity structures have been proposed.Allowing for the rapid generation of stable configurations for tensegrity structures, the form-finding method requires only knowledge of the connectivity of rods and cables.We establish an optimization model for tensegrity form-finding based on the force density method.The model is solved by using a genetic algorithm to obtain the force density values, as well as the node coordinates.We validate our findings by using four examples of planar and spatial tensegrity structures.The results demonstrate that the force density-based form-finding method using QR decomposition and GA effectively solves the form-finding problem for tensegrity structures.It applies to both spatial and planar tensegrity structures, including regular and irregular configurations.Therefore, designers can utilize our research method to obtain node coordinates and corresponding force density values, to facilitate tensegrity structure assembly and internal force analysis.
In engineering applications, regular tensegrity structures are the main structural forms of tensegrity structures.Our research can find regular tensegrity structures with high precision.During the formfinding process of an irregular tensegrity structure, we observed that the accuracy of form-finding decreased.By modifying some parameters of GA, the accuracy of the algorithm was improved, and the accuracy requirements were met.Future work will focus on the study of more complex tensegrity structures, especially irregular tensegrity structures.This would involve speeding up the convergence of genetic algorithms or utilizing large-scale optimization methods.