1 Introduction

The pin-jointed structures are widely constructed in a variety of fields, such as industrial and aerospace. Their shape, which is defined by nodal coordinates, is significant in their function, which may be sensitive to small movements [1, 2]. Besides the shape, the internal force of the structural members is also structurally noteworthy [3]. Sometimes owing to unexpected loads or harsh environment, the nodes of such structures are dislocated, which cause shape disturbance; this leads to reduce the efficiency of the structural performance [4]. To reform the shape of deformed structures, the shape controlling idea has been introduced by Weeks [5], then analytically presented by Haftka and Adelman [6]. Furthermore, to reshape the misshapen configuration, some members’ lengths should be altered [7, 8]. Moreover, the members lengthening or shortening is done through a mechanical device called an actuator [9]. A general definition of structural shape controlling could be the process of moving the coordinates of some joints by altering the length of some members [10, 11].

Actuators are placed on active members to alter the length of effective bars to produce efficient changes [12]. In the last three decades, intensive work has been carried out to control the shape of structures, for example, geometry control of prestressed space structures [9, 13,14,15]. Researchers used different methods for shape controlling of several types of structures, such as a tension truss antenna [16, 17], prestressable cable structures [18], and cable-net structures [19,20,21,22]. However, due to the actuation process, the stress of some members exceeded the limit; to redistribute the stress in members, the internal force should also be considered.

Concerning stress control in structures, Kwan and Pellegrino [3] made an attempt to monitor and control internal force in members of a space truss. Moreover, regarding the shape and stress control simultaneously, Saeed and Kwan [4] developed a technique from the linear force method (FM) to control the stress or/and shape of flexible structures. In their approach, the targeted internal forces and displacements were unique numbers. While in this paper, the targeted displacement and internal force can be given as domain, a domain is given for the actuation per actuator. Additionally, minimizing the total amount of actuation and number of actuators was also suggested through optimization algorithms.

A few pieces of research have been conducted on optimization in the area of structural controlling; researchers attempted to optimize the actuator numbers to control the shape of large space structures [23] and cable-net [24, 25] and tensegrity structures [26]. In this paper, the fmincon function, which relies on four different algorithms, namely SQP, trust-region reflective, interior point, and active set, is used to find the smallest possible set of actuators with the minimum number of actuators. So, the current technique not only reshapes and redistributes the stress of trusses, but also identifies and excludes the inactive actuators to miniaturize actuator numbers. In this research, a MATLAB self-coded program has been used with a MATLAB predefined function called fmincon, to control the shape and stress of truss structures and optimize the actuation, actuator numbers, and processing time. As a result, the optimum results will be obtained in one turn, while in conventional techniques, it could take several trials to attain a reasonable result.

In conventional approaches, when some joint displacement and bar forces were targeted to be controlled, after obtaining the set of actuators, the actuation was applied to the structure and, then, some other joint displacements and force members may surpass the limit. However, in the presented approach, all joint displacements and internal forces can be considered to take a value within a given limit \(\left[ { - d_{t} \;{\text{to}}\;d_{t} } \right]\) and \(\left[ { - t_{t} \;{\text{to}}\;t_{t} } \right]\). Maximum and minimum limit actuation can also be given to actuators \(\left[ { - e_{mx} \;{\text{to}}\;e_{mx} } \right]\) mm, and in addition the algorithm also allows a limit to exclude the actuators with actuation less than \(\left[ { - e_{mn} \;{\text{to}}\;e_{mn} } \right]\).

The technique guarantees achieving possible requirements without violating any limit while obtaining the minimum number of actuators and minimal actuation in one trial. This is owing to the fact that the user can give domains (\(\left| {d_{t} } \right|{\text{mm}}\) and \(\left| {fy/A} \right|N\) to targeted displacements and internal forces, respectively), which means all joints and members are free to take any values of nodal displacement and stress between \(- d_{t}\) to \(d_{t}\) mm and \(- fy/A\) to \(y/A\), respectively. Using the quoted method, giving a specific value for each targeted joint and member will be restricted and this will be almost impossible in the case of large-scale structures.

In addition to that, the technique automatically (coded in MATLAB) excludes the inactive members (actuators with \(\left[ { - e_{mx} \;{\text{to}}\;e_{mx} } \right]\)), which reduces the number of actuators. It can be said, using quoted methods, several trials are required to achieve a reasonable result, and excluding the actuators are done manually, even though the user may not get the best possible result. While using the current technique, with the first trial, the user will get the optimum results. In the case of impossible targets, there will be a noticeable dissimilarity between the goals and the obtained results; in this case, reselection of the actuators should be performed. For confirmation of the results, the set of \(e_{o}\) obtained from MATLAB was also applied to the structure in SAP2000. Table 1 shows that there is a negligible discrepancy between \(t_{a}\) and \(d_{a}\) obtained from MATLAB and SAP2000.

Table 1 Comparison of the efficiency of the current technique and the quoted method to control the shape and stress in a prestressable truss in Fig. 6

2 Methodology

2.1 Actuators

In this research, mechanical actuators are used to alter the length of the bars. The actuators can be screwed in or out with respect to the amount obtained from the equations for shortening and lengthening the members.

2.2 MATLAB Program

MATLAB is a powerful program that can be extensively developed for a wide class of engineering including structural engineering problems and their applications. In this paper, MATLAB program has been used to implement the fmincon function with the proposed formulas to optimize the sources such as actuators and time. After obtaining the set of \(e_{o}\), they are applied to the structure to see whether the goals are obtained.

2.3 SAP2000 FEM Program

This numerical program was used to verify the results. The set of \(e_{o}\) obtained from MATLAb is applied to the structure through SAP2000 to make sure that no mistakes has been made.

3 The Derivation of the Technique Based on FM and the Optimization Approach

3.1 The Force Method

The proposed approach is based on FM. For a truss with \(i\) dimensions, \(j\) joints, \(b\) bars, and \({\text{P}}\) external nodal loads, the internal and external loads are related by the equilibrium matrix as presented below:

$$Ht = P,$$
(1)

where \(H\) can be defined as a matrix of equilibrium, \(t\) is the internal force in members, and \(P\) is the applied load. The external joint displacements and internal bar elongations are related by the compatibility matrix

$$Cd = e,$$
(2)

in which \(C\) is the compatibility matrix that can be expressed as \(H^{T}\), and \(d\) and \(e\) are joint displacements and internal bar elongations, respectively. Furthermore, the members’ internal forces and elongations are related to the flexibility matrix, which can be expressed as

$$Ft = e,$$
(3)

in which \(F\) is the flexibility matrix, which can be obtained from \(L/EA\);\(L\) is the member’s original length and \(EA\) is the bar’s rigidity. Therefore, the stiffness of all members has a positive value; the flexibility matrix is always square. There are two solutions for \(t\) that are \(t_{H} = H^{ - 1} P\) and \(Ht = 0\), which can be obtained from null space \(({\text{null}}(H) = S)\). \(S\) is the self-stress state, and there are \(r\) number of vectors of \(S\), \(r = b - {\text{rank}}(H)\). The internal force (t) can be expressed as

$$t = t_{H} + SR.$$
(4)

\(R\) is the number of redundant which depends on the degree of indeterminacy numbers.

In the following,\(e\), which is the elongation of each bar, is introduced.

$$e = e_{o} + Ft,$$
(5)

where \(e_{o}\) is the bar length changing through actuators to prestress the structure. Other than a few numbers of elements, \(e_{o}\) for most members is zero. It can be said that \(e\) is induced by \(e_{o}\) and/or loading (\(Ft\)). Adding the two above equations provides

$$e = e_{o} + F(t_{H} + SR).$$
(6)

Compatibility is ensured by imposing \(e\) that can be obtained from null (\(C\)), since \(C^{T} = H,\) and thus \(S^{T} e = 0,\)

$$S^{T} e_{o} + S^{T} F(t_{H} + SR) = 0,$$
(7)

from which

$$- R = (S^{T} FS)^{ - 1} [S^{T} e_{o} + S^{T} Ft_{H} ].$$
(8)

3.2 Establishing the Technique with an Illustrative Example

From the back substitution of \(R\) into Eqs. (2) and (4), \(d\) and \(t\) can be found. To achieve the quantity of actuation for shape controlling, Eq. (8) is substituted into Eq. (6) that gives

$$\begin{aligned} e & = e_o + F(t_H - S(S{{\rm T}} FS)^{ - 1} [S^{{\rm T}} e_o + S^{{\rm T}} Ft_H ]) \\ &= [I - FS(S^{{\rm T}} FS)^{ - 1} S^{{\rm T}} ]e_o + [F - FS(S^{{\rm T}} FS)^{ - 1} S^{{\rm T}} F]t_H . \end{aligned} $$
(9)

Equations (9) and Eq. (2) give [4]

$$Ye_{o} + d_{p} = d_{t} ,$$
(10)

in which \(Y = C^{ + } - C^{ + } FS(S^{T} FS)^{ - 1} S^{T}\) is the matrix that relates the actuators and the free joints. \(d_{p} = [C^{ + } F - C^{ + } FS(S^{T} FS)^{ - 1} S^{T} F]t_{H}\) is the joint displacement due to \({\text{P}}\), and \(d_{tar}\) is the required displacement.

To obtain \(e_{o}\) to redistribute the stress in members, Eq. (8) is put into Eq. (4).

$$\begin{gathered} t_{tar} = t_{H} - S(S^{T} FS)^{ - 1} [S^{T} e_{o} + S^{T} Ft_{H} ]) \hfill \\ = [t_{H} - S(S^{T} FS)^{ - 1} S^{T} Ft_{H} ] - [S(S^{T} FS)^{ - 1} S^{T} ]e_{o} , \hfill \\ \end{gathered}$$
(11)
$$Ze_{o} = t_{p} - t_{t} ,$$
(12)

where, \(Z = S(S^{T} FS)^{ - 1} S^{T}\) is the matrix that connects the actuators and the targeted members, while \(t_{p} = t_{H} - S(S^{T} FS)^{ - 1} S^{T} Ft_{H}\) is the internal force due to \({\text{P}}\) only. After applying the actuation in the members, terms \(d_{a}\) and \(t_{a}\) can be found in the text and tables and represent nodal displacements and internal forces after actuation.

Equation (10) allows displacement control of pin-jointed structures without regard to internal force; it will be implemented to control the joint displacement of a pylon tower shown in Fig. 1.

Fig. 1
figure 1

An electricity pylon truss with 10 joints and 25 bars

Figure 1 shows a numerical model of a 5080 mm high pylon tower with 10 joints and 25 members. It was subjected to two downward vertical loadings with 77850 N through the two top joints. The members have the shape of angle L15 × 15 × 4.25 mm with modulus of elasticity and yield stress of 65,000 MPa and 270 MPa, respectively. When the tower is loaded, the vector of x, y and z displacements of the free joints gave \(d_{p}\) = [− 2.44, 0, − 30.13, 2.44, 0, − 30.13, − 0.27, 0.86, − 18.15, 0.27, 0.86, − 18.15, 0.27, − 0.86, − 18.15, − 0.27, − 0.86, − 18.15]. The target was to reduce z-displacement of the free joints to − 5 mm. When Eq. (10) was applied, the targets were obtained through actuating members 1–25 by \(e_{01}\) = [− 6.9, 6.1, 6.1, 6.1, 6.1, 10.9, 10.95, 10.9, 10.9, − 2.4, -2.4, -0.7, − 0.7, 5.8, 5.8, 5.8, 5.8, 6.2, 6.2, 6.2, 6.2, 11.7, 11.7, 11.7, 11.7] mm correspondingly. While the goal in terms of the displacement control have been attained, \(d_{a1}\)= [1.2, 0.0, − 5.0, − 1.2, 0.0, − 5.0, 0.4, − 0.5, − 5.0, − 0.4, − 0.5, − 5.0, − 0.4, 0.5, − 5.0, 0.4, 0.5, − 5.0], the internal force of some members surpasses the elastic limit (\(\left| {Fy/A} \right| = \left| {30205} \right| \, N\)); \(t_{a1}\) = [17449, − 15,181, − 15,181, − 15,181, − 15,181, − 29,148, − 29,148, − 29,148, − 29,148, 5303, 5303, − 126, − 126, − 13,617, − 13,617, − 13,617, − 13,617, − 14,019, − 14,019, − 14,019, − 14,019, − 31,589, − 31,589, − 31,589, − 31589].

For this reason, it is essential to control the joint displacements and internal forces simultaneously [4]. Equations (10) and (12) can be combined as follows:

$$\left[ {\begin{array}{*{20}c} Y \\ Z \\ \end{array} } \right]e_{o} = \left[ {\begin{array}{*{20}c} {d_{t} - d_{p} } \\ {t_{p} - t_{t} } \\ \end{array} } \right].$$
(13)

Equation (13) contains two parts; the upper one related to the nodal displacement control and the bottom portion associated with internal bar force control. The relationship is an equality simultaneous equation; \(d_{t}\) and \(t_{t}\) have to be provided as exact numbers. In this case, in the second trial, \(d_{t}\) was − 5 mm for the z-direction of all free joints and \(t_{t}\) was − 30,205 for members 22–25.

After implementing Eq. (13), a set of actuations was obtained: \(e_{02}\) = [0.09, − 0.08, − 0.08, − 0.08, − 0.08, − 0.02, − 0.02, − 0.02, − 0.02, − 0.47, − 0.47, − 0.46, − 0.46, 0.57, 0.57, 0.57, 0.57, 0.57, 0.57, 0.57, 0.57, − 0.57, − 0.57, − 0.57, − 0.57] mm. Now, the targets have been achieved after two trials and actuating 25 members with the total amount of 176 + 9.7 = 185.17 mm. For a large-scale structure, it is time consuming to monitor the results, and it is more likely for the user to make mistakes: therefore, the technique has been improved.

One of the novelties of this research is editing Eq. (12) such that the designer can give the domain \( \left[ { - fy/A\;to\;fy/A} \right] \) to all members, rather than giving specific numbers to specific members. Since the elements of the structure can be either in tension or in compression within the elastic range, the relationship of Eq. (12) turned into a two-sided inequality as follows:

$$ - t_{{t}} \le Ze_{{o}} t_{{p}} \le t_{{t}} . $$
(14)

Then substituting it into the simultaneous equation as follows:

$$ \begin{gathered} Ye_{o} = d_{t} - d_{p} \\ - t_{t} \le Ze_{o} t_{p} \le t_{t} . \\ \end{gathered} $$
(15)

Another novelty of this work is implementing the fmincon function Eq. (16) for optimization. The function relies on four optimization techniques, in different cases (SQP, trust-region reflective, interior point, and active set) to solve the optimization problem [27]. The function tries to use as less as possible number of actuators by selecting the most effective members and excluding the inactive members to reach the goals.

$$ \min f(x) = \sum\limits_{i = 1}^{n} {e_{oi} } , $$
(16)

in which \(n\) is the selected actuator numbers. The fmincon function is subjected to Eq. (15), while the condition of Eq. (17) is strictly considered.

$$ \left| {L_{b} } \right| \le \left| {e_{o} } \right| \le \left| {U_{b} } \right|, $$
(17)

where \(L_{b}\) to \(U_{b}\) is the domain of each actuator. Another advantage of using the presented approach is, based on the length of the members, \(U_{b}\) might be given as the maximum and limit, while minimum limits \(L_{b}\) also can be provided to eliminate the inactive actuators.

Now, the current technique is applied to see the effectiveness of the proposed method. For the example above, still, the targeted nodal displacements should be given as exact numbers to specific joints, while the internal force can be given as a domain \(\left[ {\left| {fy/A} \right| = - 30205\;{\text{to}}\;30205} \right]N\) which means all members of the structure are free to get any value within the elastic range.

Equation (16) is subjected to Eq. (15) considering Eq. (17), then a set of actuations has been obtained: \(e_{01}\) = [− 15, 4.03, 4.07, 4.07, 4.07, 11.35, 11.35, 11.35, 11.35, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 13.93, 13.93, 13.93, 13.93, 10.24, 10.24, 10.24, 10.24], total \(e_{0} = 173.36\;{\text{mm}}\). It can be noticed that only 17 members were used as actuators and the sum of actuation was only 173.3 mm. However, the internal force of the members remained within the given domain, while some other joints exceeded \(\left| 5 \right|{\text{mm}}\) displacement: \(d_{a1}\) = [5.36, 0.00, − 5, − 5.36, 0.00, − 5.00, − 1.35, − 0.48, − 5.00, 1.35, − 0.48, − 5.00, 1.35, 0.48, − 5.00, − 1.35, 0.48, − 5.00] mm. To reduce the displacement of the current exceeded joints, another trial should be attempted, the two surpassed displacements need to be added to the previous goals and a new set of actuations obtained: \(e_{01}\) = [14.28, 4.24, 4.24, 4.24, 4.24, 11.35, 11.35, 11.35, 11.35, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 13.93, 13.93, 13.93, 13.93, 10.24, 10.24, 10.24, 10.24], total \(e_{0} = 173.3\;{\text{mm}}\). After applying this set of actuations to the structure, the goals were precisely obtained. To obtain the optimum solution in one trial, Eq. (10) can be also expressed as a two-sided inequality and added to the simultaneous equation as follows:

$$ \begin{gathered} - d_{t} \le - Ye_{o} d_{p} \le d_{t} \\ - t_{t} \le Ze_{o} t_{p} \le t_{t} . \\ \end{gathered} $$
(18)

In this case, the nodal displacements of all joints and internal forces of all members can be considered as targeted and inputed as domains. Equation (16) is also subjected to Eq. (18), considering Eq. (17). The minimum actuation can be obtained by actuating the optimal number of actuators with optimum time.

For the same example above, the targets were \(d_{t}\) = [− 5 to 5] mm for all joints (i.e., all joints were free to take any displacement value within |5| mm. Furthermore, \(t_{t}\) = [− 30205 to 30205], which means all members were free to take any value within the yield stress. After applying Eqs. (18), 16 and 17, the optimum set of actuation in one trial was obtained: \(e_{01}\) = [− 14.28, 4.24, 4.24, 4.24, 4.24, 11.35, 11.35, 11.35, 11.35, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 13.93, 13.93, 13.93, 13.93, 10.24, 10.24, 10.24, 10.24], total \(e_{0} = 173.3\;{\text{mm}}\). It can be said that using the quoted method took two steps to solve the problem, while using the current approach, optimum solution can be obtained in one step (procedure time minimized by 50%) as presented in Fig. 2. The number of actuators reduced from 25 to 17, which has been optimized up to 32%, as shown in Fig. 3. Furthermore, the amount of actuation was decreased from 185.17 mm to 173.3 mm, which was optimized by 6.5%, as illustrated in Fig. 4.

Fig. 2
figure 2

Optimization in the processing time for the problem solution

Fig. 3
figure 3

Minimization of the number of actuators

Fig. 4
figure 4

Minimization of the amount of actuation

3.3 The Procedure of the Current Approach

Figure 5 shows the flowchart of the work to obtain minimum \(n\) and \(e_{o}\). Firstly, the property and the geometry of the structure were input, and then the structure will be analyzed. One may suggest that the noticeable displacements of the critical positions should be nullified or reduced and the stress of members redistributed. In this case, domains are given for nodal displacements and internal forces. Now, all members could be involved as actuators, so Eqs. (18), (16), and (17) are implemented, and now a set of \(e_{o}\) is gained. In practice, actuation with less than 0.1 mm might be incapable; thus, \(e_{o(i)} < 0.1\;{\text{mm}}\) is excluded. This process is iteratively repeated until \(e_{o(i)} > 0.1\;{\text{mm}}\) is preserved. Next, the set of \(e_{o}\) is applied to the structure, and the results are compared with the targets. If their dissimilarity is negligible, this will be the last set; otherwise, the actuators' set should be re-selected. Finally, when all conditions are met, the final \(e_{o}\) will be the minimum actuation amount with the minimal actuator numbers. The quoted approach and the proposed method have been implemented in two different examples to observe the efficiency of the current technique. It should be highlighted that the sets of \(e_{o}\) were applied to the numerical models in SAP2000 to verify the results of the proposed approach.

Fig. 5
figure 5

Flowchart of the shape and stress control simultaneously

4 Examples

4.1 Example 1

Saeed and Kwan [4] tested an indeterminate truss with three interconnected bays with seven states of self-stresses; the structure contains 20 bars that have \(EA = 4 \times 10^{4} N\) as shown in Fig. 6. For the given loadings, the top joints (5–8) were moved downward by 1.75, 12.46, 16.00, and 2.30 mm, respectively; the author’s target was to make the top free joint displacements at 8 mm, while the other joint displacements were free to take any value. All members participated as actuators; the target was achieved by \(e_{o1} = 47.15\;{\text{mm}}\) actuation.

Fig. 6
figure 6

Prestressable three-bay truss

At the same time, the internal force of the three members (7, 12, and 16) exceeded \(\left| {1500} \right|\) N, which was their limit. Their new target was keeping the top joints in their current positions (having 8 mm downward displacement) and reducing the force of the three members to \(\left| {1500} \right|\) N. They applied the second set of actuation (\(e_{o2} = 8.15\;{\text{mm}}\)), and the targets were achieved, but then again, the stress in member 9 surpassed the limit. Once more, for the third time, their previous targets remained, with declining the internal force of the ninth bar added to the requirements. Finally, the targets were accomplished by \(e_{o3} = 8.45\;{\text{mm}}\). The overall effort was taking three trials, using 20 actuators and \(e_{{{\text{total}}}} = 63.75\;{\text{mm}}\) afterward.

Saeed and Kwan [4] stated that some actuators were inactive for adjusting some joints and bar forces; this can be found in the coefficients of \(Y \, and \, Z\). They redid the test, but manually excluded the deficient actuators using the Gauss–Jordan operation, as shown in Table 1.

It can be seen that, in the fourth trial, Saeed and Kwan [4] used only eight bars as actuators with 55.45 mm actuation; as a result, targeted displacements and reduction of the internal forces were attained, while two other bars exceeded the limit. For this reason, in the fifth trial, they involved nine actuators for adjusting the y-displacement of the four top joints and keeping the stress of the five bars (1, 7, 9, 12, and 16) at 1500 N. The targets were achieved with a total actuation of 45.18 mm. Finally, after extensive search (20C9_167; 960 solutions), they achieved their best result: controlling the top four joints and five members with nine actuators and total \(e_{o} = 41.2\,{\text{mm}}\). However, their targets can be obtained with optimum time, number of actuators, and amount of actuation using the current technique.

Equations (15) – (17) can be applied to achieve the goals of the previous work within one trial, \(d_{t}\) = [dy5 dy6 dy7 dy8] = [− 8 − 8 − 8 − 8], and in terms of internal force, \(\left[ { - 1500 \, \le t_{t} \, \le 1500} \right]\) can be given as limits for all members of the structure. It can be seen from Table 1 that the targets were achieved by actuating only eight active actuators with a total amount of 41.06 mm. When Eqs. (18), (16), and (17) are implemented, \(d_{t}\) and for all joints and \(t_{t}\) for all members are given as domains \(\left[ { - 8\,{\text{mm}} \le d_{t} \le 8\;{\text{mm}}} \right]\) and \(\left[ { - 1500N \, \le t_{t} \le 1500N} \right]\). Table 1 clearly shows that the targets were achievable through actuating only five cables with a total amount of 20.99 mm. The effectiveness of the proposed technique is illustrated in Figs. 7, 8, and 9.

Fig. 7
figure 7

Optimization of the number of trials

Fig. 8
figure 8

Optimization of the number of actuators

Fig. 9
figure 9

Optimization of the amount of actuation

Figure 7 shows the minimization of the processing time by 83%, in which using the current technique needs only one trying to accomplish the task, while using the quoted method takes up to six trials. Furthermore, if the proposed technique is implemented, only five actuators are necessary to get the goals, while using the previous method, it is necessary to evolve nine actuators. In this case, the minimization is up to 44%, as presented in Fig. 8. In terms of the amount of actuation, Fig. 9 shows that the current method requires 20.99 mm as total actuation, while the conventional method requires 41.2 mm; it can be said that the amount of actuation can be optimized by almost 50%.

4.2 Example 2

In this example, a numerical model of a two-degree of indeterminacy prestressable truss with 7 joints and 13 members (see Fig. 10) with \(EA = 4 \times 10^{5} N\) for all members was tested using the quoted method [4] and the present technique to find out the effectiveness of the current approach. The top free joints were loaded downward with 600 N, and the induced displacements (d) and the internal forces (t) are given in Table 2. The targets were nullified the downward displacement of the three top unrestrained joints and controlled the stress of the bars below \(\left| {1500} \right|N\). Using the referenced technique, the targeted force must be a specified number; using the current method, the stress can take any value between −1500 N and 1500 N, which assists in the optimization process. In this example, the joint displacement targets are exact numbers, and in this situation there is no need to use Eq. (18).

Fig. 10
figure 10

Prestress 2D truss with two degrees of indeterminacy

Table 2 Comparison between the current approach and the quoted method

Table 2 clearly shows the relocation of the Y-coordinate of the top free joints and preserving the stress at 1500 N in member 5 (using Saeed and Kwan [4]) and keeping the stress below \(\left| {1500} \right|N\)(using the current method) were attained. In a previous study, two trials were required to obtain reasonable results, whereas using the current approach the optimum results were attained within one trial and the minimization of the number of trials was 50% (see Fig. 11). Nevertheless, the present method achieved the targets by employing only three members as actuators and the total actuation of 2.80 mm, as presented in Figs. 12 and 13. Moreover, using the quoted method, all members in trial 1 and 11 in trial 2 were used as actuators, with a total actuation of 4.17 mm. Numerically speaking, the advantage of the present technique over the referenced method is 73% and 30% on minimizing the actuator numbers and total actuation, respectively. To validate the obtained results from MATLAB, the set of \(e_{o}\) found from MATLAB were implemented to the structure in MATLAB itself and SAP2000 numerical software. It can be seen from Table 2 that there is an insignificant dissimilarity between \(t_{a}\) and \(d_{a}\), obtained from MATLAB and SAP2000 software.

Fig. 11
figure 11

Minimization in the number of trials

Fig. 12
figure 12

Minimization in the number of actuators

Fig. 13
figure 13

Minimization in the amount of actuation

5 Conclusion

A method for reshaping and stress controlling trusses has been developed by involving optimization techniques to minimize the number of actuators and miniaturize actuation with minimal time procedure. The advantages of the proposed method over the previous methods are:

  • The current technique is more efficient than the previous study for controlling the geometry and stress of pin-jointed assemblies containing compression and tension members to reach the targets in a shorter time with less effort.

  • The processing time can be optimized up to 83%.

  • The number of actuators can be minimized up to 73%.

  • The total amount of actuation can be miniaturized up to 50%.

  • Using previous methods, the targeted internal force must be a specific number, while using the current approach, the target could be input as a domain \(\left| {fy/A} \right|\), which optimizes the solution.

  • The current approach allows the user to input the targeted displacements as a domain \(\left[ { - d_{t} \;{\text{to}}\;d_{t} } \right]\), while the user should input the exact numbers in the previous methods.

  • Adjustment of displacement and stress can be done in several steps if the quoted method is used, while it is accomplished by only one step if the current technique is applied.

  • The results were verified by SAP2000 software.