# Optimization for truss design using Bayesian optimization

Bhawani Sandeep1, Surjeet Singh2, and Sumit Kumar3
12 KL University, Guntur, India, 3Georgia State University,USA
Email: Corresponding author<EMAIL_ADDRESS>
###### Abstract

In this work, geometry optimization of mechanical truss using computer-aided
finite element analysis is presented. The shape of the truss is a dominant
factor in determining the capacity of load it can bear. At a given parameter
space, our goal is to find the parameters of a hull that maximize the load-
bearing capacity and also don’t yield to the induced stress. We rely on finite
element analysis, which is a computationally costly design analysis tool for
design evaluation. For such expensive to-evaluate functions, we chose Bayesian
optimization as our optimization framework which has empirically proven sample
efficient than other simulation-based optimization methods. By utilizing
Bayesian optimization algorithms, the truss design involves iteratively
evaluating a set of candidate truss designs and updating a probabilistic model
of the design space based on the results. The model is used to predict the
performance of each candidate design, and the next candidate design is
selected based on the prediction and an acquisition function that balances
exploration and exploitation of the design space. Our result can be used as a
baseline for future study on AI-based optimization in expensive engineering
domains especially in finite element Analysis.

###### Index Terms:

Bayesian optimization, Finite Element Analysis, mechanical design, FreeCAD,
Aritificial Intelligence.

##  I Introduction and Problem Formulation

A truss is a structural element that is commonly used in engineering and
architecture to support loads over long spans. It is a system of
interconnected triangles that work together to distribute loads in a manner
that is both efficient and stable. Trusses are commonly used in a variety of
applications, such as bridges, roofs, towers, and even bicycles. In each case,
the truss is designed to meet specific requirements for load capacity, span
length, and environmental conditions. For example, in bridge construction,
trusses are often used to support the weight of the deck and distribute it
evenly to the piers or abutments. By using a truss system, the bridge can span
long distances without requiring additional support structures in the middle.
This can be particularly useful in areas where there are obstacles such as
waterways, valleys, or other natural features. The use of mechanical trusses
is becoming increasingly popular in a variety of applications, such as bridge
construction, roof structures, and even the design of complex machinery.
Another advantage of trusses is their flexibility. They can be designed to be
lightweight and easy to transport, making them ideal for use in temporary
structures or in remote locations where transportation and logistics are a
concern. In roof construction, trusses are used to support the weight of the
roof and distribute it evenly to the walls or columns. By using a truss
system, the roof can span large distances without requiring additional support
structures in the middle. This can be particularly useful in areas where there
is a need for large open spaces, such as sports arenas or convention centers.
In tower construction, trusses are often used to provide stability and support
to tall structures. By using a truss system, the tower can resist the forces
of wind and other environmental factors that can cause it to sway or tip over.
In bicycle construction, trusses are used to provide a lightweight and strong
frame that can withstand the forces of pedaling and other stresses. By using a
truss system, the bike can be made lighter and more efficient without
sacrificing strength or durability.

Overall, trusses are a versatile and effective structural element that is
widely used in engineering and architecture. Whether in bridges, roofs,
towers, or bicycles, trusses provide a strong and stable platform that can
support large loads over long spans. With their combination of efficiency,
strength, and aesthetic appeal, trusses are sure to remain a popular choice
for designers and engineers for many years to come. One area where mechanical
trusses have shown great potential in recent times is in the field of
renewable energy. They are being used to support large-scale solar arrays or
wind turbines, allowing for optimal positioning and orientation of the
equipment to maximize energy production. The ability to adjust the trusses
allows for fine-tuning of the system to ensure that it is operating at maximum
efficiency, even in changing weather conditions.

The truss design problem is highly nonlinear and its convexity is not
guaranteed on a given design space. Truss optimization is the process of
designing trusses that can carry the required loads while minimizing the
weight and resultantly cost of the structure. There are several methods for
optimizing trusses, including manual optimization, computer-aided
optimization, and genetic algorithms. Manual optimization involves the use of
mathematical equations and hand calculations to determine the optimal size and
spacing of truss members. This method can be time-consuming and requires a
high level of expertise, but it can be effective for simple truss structures.
Computer-aided optimization involves the use of software programs that use
Finite Element Analysis (FEA) to analyze and optimize truss designs. These
programs can quickly analyze a large number of design options and provide
recommendations for the most efficient and cost-effective truss design.
Computer-aided optimization can be used for more complex truss designs, but it
requires specialized software and expertise to use effectively.

In this work, we focus on computer-aided optimization of truss geometric
design using the AI-based optimization framework Bayesian optimization.
Application of Bayesian optimization in engineering design is coming up in
various recent works[1, 2]. Bayesian optimization has empirically shown sample
efficiency in expensive-to-evaluate processes. Since FEA is an expensive
process[3], we leverage the BO in this scenario. We observed that within $100$
evaluations, BO is able to find near-optimal design. This study can be used as
a baseline for optimization studies in expensive to-evaluate engineering
domains.

##  II Approach

###  II-A Bayesian optimization:

Bayesian optimization[4] is a sequential model-based optimization technique
that is used to optimize black-box functions, where the objective function is
unknown and expensive to evaluate. It works by iteratively constructing a
probabilistic model of the objective function, based on the data collected
from the previous iterations, and using the model to decide the next point to
evaluate. In Bayesian optimization, the objective function is assumed to be a
sample from a Gaussian process ($\mathcal{GP}$)[5], which is a collection of
random variables, any finite number of which have a joint Gaussian
distribution. The $\mathcal{GP}$ is defined by its mean and covariance
functions, which capture our prior belief as well as data-based behavior of
the objective function. At each iteration, the GP model is updated with the
new data, and a so-called acquisition function is used to decide the next
point to evaluate. The acquisition function balances the exploration of new
regions of the search space with the exploitation of regions that are likely
to contain the optimum. Common acquisition functions include Expected
Improvement (EI)[6], Probability of Improvement (PI), and Upper Confidence
Bound (UCB)[7]. The iterative process continues until a stopping criterion is
met, such as a maximum number of iterations or a small improvement in the
objective function. The final solution is then taken as the point that
maximizes the objective function. Bayesian optimization has been successfully
applied in various domains, such as hyperparameter tuning in machine learning,
experimental design in materials science, and drug discovery in
bioinformatics. It is particularly useful when the evaluation of the objective
function is expensive or time-consuming, as it can efficiently explore the
search space and find the optimum with a small number of evaluations. Sure!
The mathematical equations for Bayesian optimization are as follows:

Let $f(x)$ be the unknown black-box function to be optimized, where $x\in X$
is a d-dimensional input vector from a bounded domain $X$.

A Gaussian process ($\mathcal{GP}$) prior over $f(x)$ is assumed:

$f(x)\sim\mathcal{GP}(m(x),k(x,x^{\prime}))$

where $m(x)$ is the mean function, and $k(x,x^{\prime})$ is the covariance
function. At any iteration $t$, a set of observations
$D_{t}={(x_{0},y_{0}),...(x_{i},y_{i}),...,(x_{t},y_{t})}$ is collected, where
$y_{i}=f(x_{i})+\epsilon_{i}$ is the noisy observation of $f(x_{i})$, and
$\epsilon_{i}$ is the measurement noise. Based on the observations $D_{t}$,
the $\mathcal{GP}$ posterior over $f(x)$ is updated using Bayes’ rule:

$p(f(x)|D_{t})=N(f(x)|m_{t}(x),k_{t}(x,x^{\prime}))$

where $m_{t}(x)$ and $k_{t}(x,x^{\prime})$ are the posterior mean and
covariance functions at $t^{th}$ iteration respectively. An acquisition
function $\alpha(x)$ is defined to choose the next point $x_{t+1}$ to
evaluate. A common acquisition function is Expected Improvement (EI):

$EI(x)=E[max(y^{*}-y,0)]$

where $y^{*}$ is the best observation so far, $y^{*}=max(y_{1},...,y_{t})$,
and $\mathbf{E}[.]$ denotes the expectation with respect to the posterior
distribution $p(f(x)|D_{t})$.

Finally, the next point to evaluate $x_{t+1}$ is chosen as:

$x_{t+1}=argmax_{x}\alpha(x)$

The process continues until a stopping criterion is met, such as a maximum
number of iterations or a small improvement in the objective function. The
specific form of the mean and covariance functions, as well as the choice of
acquisition function, is a hyperparameter setting but can be varied can vary
depending on the user’s preference.

###  II-B Finite element analysis and truss design:

Finite element analysis (FEA) is a numerical technique used to analyze the
behavior of complex structures. FEA involves dividing the structure into a
large number of smaller, interconnected elements, each of which is modeled
using mathematical equations that describe its behavior. The equations for
each element are then combined to create a system of equations that describe
the behavior of the entire structure. This system of equations can be solved
using numerical methods to obtain the stresses and strains in each element.

In truss design, FEA is used to determine the stresses and strains in the
truss members to determine the location of joints and angle of the truss that
can withstand the loading condition without failure of the design. In spite of
using any commercial tool such as ANSYS, Abaqus, or SolidWorks, we used
freeCAD[8] as our simulation tool. Under given loading conditions, we run
simulations to obtain the stress and strain distributions and try to minimize
the weight of the truss within the given range of free parameters. For loading
conditions and related failure, we use von-mises stress obtained from the FEA
simulation and compare it with the yield strength of the material along with
some safety factors[9].

##  III Experiment and its result

Figure 1: Truss sketch, its parameter of variations

Figure 1 shows the sketch of the truss. Its design is split into 6 triangles
organized and constrained at joints. The parameter that can be varied
$a$,$b$,$c$, $\theta_{1}$ and $\theta_{2}$. The range and the definition is
shown in table I. Since our focus of the design is the truss used in outdoor
applications where interaction with water and moisture and other factor is
common along with being light-weighted for easy implementation, we choose
AL-6061T6 as our material. Aluminum trusses are lightweight, strong, and
resistant to corrosion, making them ideal for use in outdoor structures and
portable stages. The specific property of this material is density
$2700kg/m^{3}$, Young’s modulus $70.0GPa$, and Poisson ratio $0.350$.

Parameter | Symbol |  Minimum |  Maximum
---|---|---|---
Left outer section | $a$ | $500$ |  $2500$ mm
left center section | $b$ | $500$ |  $2500$ mm
Right center section | $c$ | $500$ | $2500.0$
Right side angle | $\theta_{1}$ | $0^{o}$ | $60^{o}$
Left side angle | $\theta_{2}$ | $0^{o}$ | $60^{o}$
Right outer section $(d)=8000-(a+b+c)$ |  |  |
TABLE I: Range of design parameters for optimization

The applied force on the truss is distributed on three loading points as shown
in figure 2. We expect our truss to work under $1000Kg$ loading conditions,
and we also keep a safety factor of $1.2$. Accordingly, the total applied
force on the truss joint is $12000$ Newtons (refer figure 2).

Figure 2: Truss and point and direction of applied force. The total force
applied is 12,000 Newton, assuming the maximum loading capacity of the truss
is 1000 Kg and a safety factor of $1.2$.

Since the evaluation of FEA is computationally intensive, we keep our
optimization budget for $100$ evaluations. The final parameter that we found
after optimization is the optimal design parameters: $a=1200.0$; $b=2497.3$;
$c=2498.2$; $d=1804.5$;$\theta_{1}=42.0$; $\theta_{2}=45.0$. For running
Bayesian optimization, we use the GPyopt[10] python package and integrate it
with the FEA evaluation tool FreeCAD. These experiments empirically show that
the AI has potential to revolutionize the field of design and other domains
[11].

##  IV Related Work

Initial work on an automatic truss design problem, formulated based on ground
structure approach by [12], who formulated it as a set of joints distributed
in the design space and connected by bars. Later this is extensively studied
by many researchers, like Dobbs and Felton[13], Bendsøe et al. [14], Miguel
and Miguel [15] etc. Due to the high nonlinearity of the problem, several
solutions have been proposed, which aim to improve the computation
tractability by simplification of problems, e.g., Imai et al[16], Ringerts
[17], Achtziger[18], and He et al [19]. The most commonly used technique is
called the alternating method where the problems are solved for a fixed
geometry but with a variation in topology and vice versa in a block-coordinate
manner to obtain designs that satisfy the optimality conditions for the
subproblems. Another group of studies on the optimization of trusses attempts
to incorporate stronger constraints than the general formulations to improve
the practicality of the optimal designs. These constraints are applied to
stresses, local buckling, global stability constraints, beam modeling, etc and
found in works of Kirsch[20], Stolpe et al [21], Rozvany [22], Guo et al.
[23], Descamps et al [24]), Ben-Tal et al. [25], Stingl [26] and Tugilimana et
al. [27], Torii et al.[28] etc. Another approach to truss design problems is
by formulating it as a nonlinear semidefinite programming problem that
involves assigning global stability constraints using a linear buckling model
and extensively studied by Kanno et al.[29], Levy and Su [30], Kočvara [31],
Stingl [26], and Evgrafov [32], Kočvara and Stingl[32] etc. On the
optimization front, apart from the active learning approach [33] various
traditional approaches have been developed in the past. A customized primal-
dual interior point method is deployed that exploits the sparsity and low-rank
properties of the associated element stiffness matrices by Ben [34], Achtziger
et al.[35]; Gilbert et al[36], Weldeyesus et al[37] etc. Application of
machine learning in engineering design is shown in [38, 39, 40], where
learning models are used to explore and learn the design space and then by
capitalizing the generalization capability able to find designs on new
requirements or noble design. Few new hybrid approaches are also being
developed in recent works[41].

##  V Conclusion and Continuation

In this work, we presented the conclusions of our experiment on truss design.
The experiment aimed to design optimization and find the optimal parameter of
the truss under a given requirement. Through the use of finite element
analysis (FEA), we analyzed the stress and deformation levels in each truss
configuration under given loading conditions. We used Bayesian optimization
with EI as our acquisition function to optimize our design. Nonetheless, we
recommend that further studies are conducted on truss design, especially on
other loading conditions and different materials, to provide more
comprehensive results that can inform the optimal design of trusses for a wide
range of applications.

## References

  * [1] H. Vardhan and J. Sztipanovits, “Search for universal minimum drag resistance underwater vehicle hull using cfd,” _arXiv preprint arXiv:2302.09441_ , 2023\.
  * [2] H. Vardhan, P. Volgyesi, W. Hedgecock, and J. Sztipanovits, “Constrained bayesian optimization for automatic underwater vehicle hull design,” in _Proceedings of Cyber-Physical Systems and Internet of Things Week 2023_ , 2023, pp. 116–121.
  * [3] H. Vardhan, U. Timalsina, P. Volgyesi, and J. Sztipanovits, “Data efficient surrogate modeling for engineering design: Ensemble-free batch mode deep active learning for regression,” _arXiv preprint arXiv:2211.10360_ , 2022\.
  * [4] P. I. Frazier, “A tutorial on bayesian optimization,” _arXiv preprint arXiv:1807.02811_ , 2018.
  * [5] C. E. Rasmussen, “Gaussian processes in machine learning,” in _Summer school on machine learning_. Springer, 2003, pp. 63–71.
  * [6] D. R. Jones, M. Schonlau, and W. J. Welch, “Efficient global optimization of expensive black-box functions,” _Journal of Global optimization_ , vol. 13, no. 4, p. 455, 1998.
  * [7] N. Srinivas, A. Krause, S. M. Kakade, and M. W. Seeger, “Information-theoretic regret bounds for gaussian process optimization in the bandit setting,” _IEEE transactions on information theory_ , vol. 58, no. 5, pp. 3250–3265, 2012.
  * [8] J. Riegel, W. Mayer, and Y. van Havre, “Freecad,” 2016.
  * [9] H. Vardhan and J. Sztipanovits, “Reduced robust random cut forest for out-of-distribution detection in machine learning models,” _arXiv preprint arXiv:2206.09247_ , 2022.
  * [10] T. G. authors, “GPyOpt: A bayesian optimization framework in python,” http://github.com/SheffieldML/GPyOpt, 2016.
  * [11] H. Vardhan and J. Sztipanovits, “Rare event failure test case generation in learning-enabled-controllers,” in _2021 6th International Conference on Machine Learning Technologies_ , 2021, pp. 34–40.
  * [12] W. S. Dorn, “Automatic design of optimal structures,” _Journal de mecanique_ , vol. 3, no. 6, pp. 25–52, 1964.
  * [13] M. W. Dobbs and L. P. Felton, “Optimization of truss geometry,” _Journal of the structural division_ , vol. 95, no. 10, pp. 2105–2118, 1969.
  * [14] M. P. Bendsøe, A. Ben-Tal, and J. Zowe, “Optimization methods for truss geometry and topology design,” _Structural optimization_ , vol. 7, pp. 141–159, 1994.
  * [15] L. F. F. Miguel and L. F. F. Miguel, “Shape and size optimization of truss structures considering dynamic constraints through modern metaheuristic algorithms,” _Expert Systems with Applications_ , vol. 39, no. 10, pp. 9458–9467, 2012.
  * [16] K. Imai and L. A. Schmit Jr, “Configuration optimization of trusses,” _Journal of the Structural Division_ , vol. 107, no. 5, pp. 745–756, 1981\.
  * [17] U. T. RINGERTZ, “On topology optimization of trusses,” _Engineering optimization_ , vol. 9, no. 3, pp. 209–218, 1985.
  * [18] W. Achtziger, “On simultaneous optimization of truss geometry and topology,” _Structural and Multidisciplinary Optimization_ , vol. 33, no. 4-5, pp. 285–304, 2007.
  * [19] L. He and M. Gilbert, “Rationalization of trusses generated via layout optimization,” _Structural and Multidisciplinary Optimization_ , vol. 52, pp. 677–694, 2015.
  * [20] U. Kirsch, “On singular topologies in optimum structural design,” _Structural optimization_ , vol. 2, pp. 133–142, 1990.
  * [21] M. Stolpe and K. Svanberg, “On the trajectories of the epsilon-relaxation approach for stress-constrained truss topology optimization,” _Structural and multidisciplinary optimization_ , vol. 21, pp. 140–151, 2001\.
  * [22] G. I. Rozvany, “Difficulties in truss topology optimization with stress, local buckling and system stability constraints,” _Structural optimization_ , vol. 11, pp. 213–217, 1996.
  * [23] X. Guo, G. Cheng, and N. Olhoff, “Optimum design of truss topology under buckling constraints,” _Structural and Multidisciplinary Optimization_ , vol. 30, pp. 169–180, 2005.
  * [24] B. Descamps and R. F. Coelho, “The nominal force method for truss geometry and topology optimization incorporating stability considerations,” _International Journal of Solids and Structures_ , vol. 51, no. 13, pp. 2390–2399, 2014.
  * [25] A. Ben-Tal, F. Jarre, M. Kočvara, A. Nemirovski, and J. Zowe, “Optimal design of trusses under a nonconvex global buckling constraint,” _Optimization and Engineering_ , vol. 1, pp. 189–213, 2000.
  * [26] M. Stingl, _On the solution of nonlinear semidefinite programs by augmented Lagrangian methods_. Shaker Aachen, 2006.
  * [27] A. Tugilimana, R. Filomeno Coelho, and A. P. Thrall, “Including global stability in truss layout optimization for the conceptual design of large-scale applications,” _Structural and Multidisciplinary Optimization_ , vol. 57, pp. 1213–1232, 2018.
  * [28] A. J. Torii, R. H. Lopez, and L. F. Miguel, “Modeling of global and local stability in optimization of truss-like structures using frame elements,” _Structural and Multidisciplinary Optimization_ , vol. 51, pp. 1187–1198, 2015.
  * [29] Y. Kanno, M. Ohsaki, and N. Katoh, “Sequential semidefinite programming for optimization of framed structures under multimodal buckling constraints,” _International Journal of Structural Stability and Dynamics_ , vol. 1, no. 04, pp. 585–602, 2001.
  * [30] R. Levy, H.-H. Su, and M. Kočvara, “On the modeling and solving of the truss design problem with global stability constraints,” _Structural and Multidisciplinary Optimization_ , vol. 26, no. 5, pp. 367–368, 2004.
  * [31] M. Kočvara, “On the modelling and solving of the truss design problem with global stability constraints,” _Structural and multidisciplinary optimization_ , vol. 23, pp. 189–203, 2002.
  * [32] A. Evgrafov, “On globally stable singular truss topologies,” _Structural and Multidisciplinary Optimization_ , vol. 29, pp. 170–177, 2005.
  * [33] H. Vardhan and J. Sztipanovits, “Deepal for regression using epsilon-weighted hybrid query strategy,” _arXiv preprint arXiv:2206.13298_ , 2022.
  * [34] A. Ben-Tal, “Bendsøe, mp,” _A new method for optimal truss topology design. SIAM Journal on Optimization_ , vol. 3, no. 2, pp. 322–358, 1993.
  * [35] W. Achtziger, M. Bendsøe, A. Ben-Tal, and J. Zowe, “Equivalent displacement based formulations for maximum strength truss topology design,” _IMPACT of Computing in Science and Engineering_ , vol. 4, no. 4, pp. 315–345, 1992.
  * [36] M. Gilbert and A. Tyas, “Layout optimization of large-scale pin-jointed frames,” _Engineering computations_ , vol. 20, no. 8, pp. 1044–1064, 2003\.
  * [37] A. G. Weldeyesus and J. Gondzio, “A specialized primal-dual interior point method for the plastic truss layout optimization,” _Computational optimization and applications_ , vol. 71, pp. 613–640, 2018.
  * [38] H. Vardhan, P. Volgyesi, and J. Sztipanovits, “Machine learning assisted propeller design,” in _Proceedings of the ACM/IEEE 12th International Conference on Cyber-Physical Systems_ , 2021, pp. 227–228.
  * [39] L. Li, Y. Chen, Y. Qiang, B. Zhou, and W. Chen, “Construction and application of numerical diagram for high-skew propeller based on machine learning,” _Ocean Engineering_ , vol. 278, p. 114480, 2023.
  * [40] H. Vardhan and J. Sztipanovits, “Deep learning based fea surrogate for sub-sea pressure vessel,” in _2022 6th International Conference on Computer, Software and Modeling (ICCSM)_. IEEE, 2022, pp. 36–39.
  * [41] H. Vardhan, P. Volgyesi, and J. Sztipanovits, “Fusion of ml with numerical simulation for optimized propeller design,” _arXiv preprint arXiv:2302.14740_ , 2023.