Next Article in Journal
Recovered Foam Impact Absorption Systems
Next Article in Special Issue
Technical Diagnostics of Industrial Robots Using Vibration Signals: Case Study on Detecting Base Unfastening
Previous Article in Journal
Adaptive Ransomware Detection Using Similarity-Preserving Hashing
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Calculation of Trusses System in MATLAB—Multibody

1
Department of Manufacturing Machinery and Robotics, Faculty of Mechanical Engineering, The Technical University of Košice, Letná 9, 04001 Košice, Slovakia
2
Department of Biomedical Engineering and Measurement, Faculty of Mechanical Engineering, The Technical University of Košice, Letná 9, 04001 Košice, Slovakia
*
Author to whom correspondence should be addressed.
Appl. Sci. 2024, 14(20), 9547; https://doi.org/10.3390/app14209547
Submission received: 27 September 2024 / Revised: 15 October 2024 / Accepted: 17 October 2024 / Published: 19 October 2024
(This article belongs to the Special Issue Advanced Digital Design and Intelligent Manufacturing)

Abstract

:
This article discusses the software tool (Simscape—Multibody program of MATLAB) primarily intended for dynamic and kinematic processes with practical applications in static calculations. Currently, there are few published scientific works utilizing this tool for tasks like basic static calculations of truss systems. We were interested in comparing the calculation using the tools we use in our work and research activities for theoretical calculation; the potential reliance on simulations in the future could help to avoid the necessity of complex theoretical calculations, which can be time-consuming and prone to errors. Despite the fact that the structure may appear simple, in practice, there may not always be time for a verification calculation in the theoretical field (proper model creation, inclusion of all conditions, etc.). The beam system is intentionally both externally and internally statically indeterminate. For this reason, it is logically necessary to also consider deformation conditions. The achieved results were interesting in terms of accuracy compared to SOLIDWORKS, which was used for computation verification. Through very simple optimization, we were able to further increase the calculation accuracy without complicating other parameters.

1. Introduction

This paper examines a statically indeterminate trusses system developed through analytical computation and the subsequent use of software tools MATLAB version 24.1.0.2628055 (R2024a) Update 4 and SOLIDWORKS Education Edition 2023 SP5.0. MATLAB—Simscape Multibody [1,2,3,4]—contains within its library Flexible Bodies Library elements named Flexible Beam [3,4] with various cross-sections. These are flexible, slender beams capable of elastic deformation. The deformation involves additions due to extension, bending, and torsion. The stiffness and inertia of the body (Flexible Beam) are calculated based on the geometry and material properties. The calculation principle employed complies with the Euler–Bernoulli beam theory [5] (pp. 174–220), [6] (pp. 8–66), [7]; hence, it is suitable for the trusses system. Numerous programs for calculating such systems exist, many in different programming languages and differing in the purpose for which they were designed. The market offers a diverse range of options. References [8,9] present an example of a statically indeterminate planar trusses system calculated using the finite element method (FEM). This is a standalone program, with the calculation verified in ANSYS [10,11,12]. In this paper, a model developed in the SOLIDWORKS environment using the Simulation tool is intended to verify the results. The entire design was created using the Weldments tool. The calculation also includes the visualization of results using the specified input parameters. The analytical calculations are performed in a linear domain subject to the well-known Hooke’s law. The term bar refers to a body of the same cross-section fixed at both ends using a rotary link, i.e., joints. An axis of the bar passes through the center of the joints. The point of connection of at least two bars in the center of the joints (forming a rotational link) is called a gusset or node. The gussets are the nodes where the transfer of forces to the rest of the structure occurs. The bar transmits the force in its axis through tension and compression, subject to the aforementioned Bernoulli–Navier hypothesis. In the case of compression, however, this is true only to a certain extent. This hypothesis assumes the preservation of the flatness of the cross-sections before and after deformation. In other words, after deformation, the cross-sections remain perpendicular to the deformed axis of symmetry of the cross-section. The same properties apply to the material of the beam in tension and compression. The normal stress is distributed uniformly; thus, there is no shear inside the bar. It should also be mentioned that the Bernoulli–Navier hypothesis is only accurate for rather slender bars. Under compressive loading, the so-called buckling [13] (pp. 483–507) occurs when the bar loses its stability and buckles out of its axis. The buckling stability of trusses systems is difficult to handle [14,15,16], especially if several parameters are monitored and optimized simultaneously [17].

2. Example of Analytical Design Based on In-Plane Deformation Conditions

The system in Figure 1 is composed of five bars. It is externally and internally statically 1× indeterminate. When one degree of freedom looseness is suitably removed at node A or D, which binds the system to the world frame, the system does not turn into a mechanism. Similarly, after removing any of the bars 1 to 5, the structure remains unchanged. This means that the given system is externally and internally 1× statically indeterminate. Thus, we partially relax the system and express the unknown reactions in terms of the deformation conditions.
The example mainly involves comparing theoretical results with simulations in MATLAB—Multibody and then conducting verification in SOLIDWORKS. The structure of the trusses system loaded by the force at node B after release from the bonds at node(s) A, D, and release of the bar between nodes AB is displayed in Figure 2.
For the energy change of the whole system under the NAB force [13] (p. 204), [18] (p. 160) in the bar, the following applies:
U N A B = 0
To determine the forces in individual nodes or gussets, we use the method of joint [19] (p. 70), [20,21]. By successively releasing the nodes, see Figure 3, Figure 4, Figure 5 and Figure 6, we denote the forces acting on the bars via the index of the nodes where the bar is attached.
  • Node A:
Figure 3. Reactions after release from the bonds at node A and release of bar AB, AC.
Figure 3. Reactions after release from the bonds at node A and release of bar AB, AC.
Applsci 14 09547 g003
In general, the following applies to the equilibrium of forces at a node:
F = 0
By decomposing into the individual axes of the coordinate system, the following applies:
F x = 0 ;   F A x + F A C 2 N A B = 0
F y = 0 ;   F A y + F A C 2 = 0
  • Node B:
Figure 4. Reactions after release from the bonds at node B and release of bar AB, BD, BC.
Figure 4. Reactions after release from the bonds at node B and release of bar AB, BD, BC.
Applsci 14 09547 g004
F x = 0 ;   N A B F B x F B D 2 = 0
F y = 0 ;   F B C F B y + F B D 2 = 0
  • Node C:
Figure 5. Reactions after release from the bonds at node C and release of bar AC, BC, CD.
Figure 5. Reactions after release from the bonds at node C and release of bar AC, BC, CD.
Applsci 14 09547 g005
F x = 0 ; F C D F A C 2 = 0
F y = 0 ; F B C F A C 2 = 0
  • Node D:
Figure 6. Reactions after release from the bonds at node D and release of bar BD, CD.
Figure 6. Reactions after release from the bonds at node D and release of bar BD, CD.
Applsci 14 09547 g006
F x = 0 ;   F D x + F C D + F B D 2 = 0
F y = 0 ;   F D y F B D 2 = 0
Consider the system of given Equations (5)–(8), where the variables without reactions at nodes A and D are searched for:
N A B 2 F B D 2 = F B x
F B C + 2 F B D 2 = F B y
F C D 2 F A C 2 = 0
F B C 2 F A C 2 = 0
And its transcription into matrix entry for automated computer calculation:
1         0         0 2 2       0 0         0         1         2 2       0 0 2 2         0         0 1 0 2 2 1         0       0 · N A B F A C F B C F B D F C D = F B x F B y 0 0
From system (15), the unknown forces in the bars expressed in terms of the known variables FBx, FBy, and NAB are as follows:
F A C = 2 · F B x N A B + F B y
F B C = F B x N A B + F B y
F B D = 2 · N A B F B x
F C D = F B x N A B + F B y
Based on the deformation condition (1) regarding the energy change in the entire system under the NAB force in the bar, the following applies:
F i · l i E i · S i · F i N A B = 0
The cross-sections Si and Young’s modulus Ei are the same in the present case. The lengths li can be expressed as multiples of the uniform length l. Subsequently, based on the deformation condition (1) regarding the energy change in the whole system under the force NAB in the bar AB, the following applies:
l E · S F i · F i N A B = 0
N A B 2 · 2 · F B x N A B + F B y F B x N A B + F B y + 2 · 2 · N A B F B x F B x N A B + F B y = 0
N A B = 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y 4 · 2 + 3
In general, the equations for external equilibrium are as follows:
F = 0
M = 0
After decomposing:
F x = 0 ;   F A x + F D x = F B x
F y = 0 ;   F A y + F D y = F B y
M A = 0 ;   F D x · l = F B y · l
Alternatively, its transcription into matrix entry for automated computer calculation is as follows:
1 0       1 0 0 1       0 1 0 0 1 0 · F A x F A y F D x F D y = F B x F B y F B y
From system (29), the unknown forces in the bars expressed in terms of the known variables FBx, FBy, and FAy are as follows:
F A x = F B x + F B y
F D x = F B y
F D y = F B y F A y
The force FAy can be calculated from the equilibrium of forces of node A using Equation (4) as follows:
F A y = F A C 2
After substituting Equation (16) into (33):
F A y = 2 · F B x N A B + F B y 2 ,
and substituting (23) into (34), the equation yields:
F A y = F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y 4 · 2 + 3 + F B y
The deflections at nodes B and C of the trusses system are determined by Castigliano’s first theorem [13] (pp. 202–204), [18] (36) for node B and (53) for node C. See Figure 7 and Figure 8. This will be determined by the partial derivative of the external component of the force vector Fe acting in the direction of the deflection sought. It is important to note that the situation is simplified assuming the same cross-sections S, Young’s modulus E, and multiples of uniform length l.
  • Node B:
Figure 7. Structure of the trusses system loaded by the force vector FB at node B and the additional external force vector FeB.
Figure 7. Structure of the trusses system loaded by the force vector FB at node B and the additional external force vector FeB.
Applsci 14 09547 g007
The deflection vector δB of node B derived from the first Castigliano theorem can be calculated using the following equation:
δ B = l E · S F i · F i F e B x F i · F i F e B y
Each component of the force Fi is expressed as a function of the component of the external force vector FeB as follows:
δ B = l E · S F e B x + N A B · N A B F e B x + 2 · F A C · F A C F e B x + F B C · F B C F e B x + 2 · F B D · F B D F e B x + F C D · F C D F e B x F e B y + N A B · N A B F e B y + 2 · F A C · F A C F e B y + F B C · F B C F e B y + 2 · F B D · F B D F e B y + F C D · F C D F e B y
By substituting the corresponding component of the external force vector FeB into Equation (23) derived from the deformation condition, the equation reads:
N A B = 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 ,
Substituting NAB into Equations (16) to (19) yields the equation as follows:
F A C = 2 · F B x + F e B x 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 + F B y + F e B y
F B C = F B x + F e B x 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 + F B y + F e B y
F B D = 2 · 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 F B x F e B x
F C D = F B x + F e B x 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 + F B y + F e B y
The individual elements of the matrix in Equation (37) after deriving by FeBx are as follows:
N A B · N A B F e B x = 4 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 · 2 · 2 + 1 4 · 2 + 3
F A C · F A C F e B x = 2 · F B x + F e B x 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 + F B y + F e B y · 1 2 · 2 · 2 + 1 4 · 2 + 3
F B C · F B C F e B x = F B x + F e B x 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 + F B y + F e B y · 1 2 · 2 · 2 + 1 4 · 2 + 3
F B D · F B D F e B x = 2 · 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 F B x F e B x · 2 · 2 · 2 + 1 4 · 2 + 3 1
F C D · F C D F e B x = F B x + F e B x 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 + F B y + F e B y · 1 2 · 2 · 2 + 1 4 · 2 + 3
The individual elements of the matrix in Equation (37) after deriving by FeBy are as follows:
N A B · N A B F e B y = 4 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 · 2 + 1 4 · 2 + 3
F A C · F A C F e B y = 2 · F B x + F e B x 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 + F B y + F e B y · 1 2 · 2 + 1 4 · 2 + 3
F B C · F B C F e B y = F B x + F e B x 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 + F B y + F e B y · 1 2 · 2 + 1 4 · 2 + 3
F B D · F B D F e B y = 2 · 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 F B x F e B x · 2 · 2 + 1 4 · 2 + 3
F C D · F C D F e B y = F B x + F e B x 2 · 2 · 2 + 1 · F B x + F e B x + 2 + 1 · F B y + F e B y 4 · 2 + 3 + F B y + F e B y · 1 2 · 2 + 1 4 · 2 + 3
In Equations (37) and (43)–(52), under the theorem, zero value is substituted for the vector FeB (FeB = 0) to obtain the resulting deflection δB of node B.
  • Node C:
Figure 8. Structure of the trusses system loaded by the external force vector FeC at node C.
Figure 8. Structure of the trusses system loaded by the external force vector FeC at node C.
Applsci 14 09547 g008
The deflection vector δC of node C derived from the first Castigliano theorem can be calculated using the following equation:
δ C = l E · S F i · F i F e C x F i · F i F e C y
Each component of the force Fi is expressed as a function of the component of the external force vector FeC as follows:
δ C = l E · S F e C x + N A B · N A B F e C x + 2 · F A C · F A C F e C x + F B C · F B C F e C x + 2 · F B D · F B D F e C x + F C D · F C D F e C x F e C y + N A B · N A B F e C y + 2 · F A C · F A C F e C y + F B C · F B C F e C y + 2 · F B D · F B D F e C y + F C D · F C D F e C y
Consider again the system of the given Equations (5)–(8) with the additional vector of the external force FeC:
N A B 2 F B D 2 = F B x
F B C + 2 F B D 2 = F B y
F C D F e C x 2 F A C 2 = 0
F B C F e C y 2 F A C 2 = 0
And its transcription into matrix entry for automated computer calculation is as follows:
1 0 0 2 2 0 0 0 0 0 1 2 2 0 0 0 0 2 2 0 0 1 1 0 0 2 2 1 0 0 0 1 · N A B F A C F B C F B D F C D F e C x F e C y = F B x F B y 0 0
From system (59), the unknown forces in the bars expressed in terms of the known variables FBx, FBy, NAB, FeCx, and FeCy are as follows:
F A C = 2 · F B x N A B + F B y + F e C y
F B C = F B x N A B + F B y
F B D = 2 · N A B F B x
F C D = F B x N A B + F B y F e C x + F e C y
Based on the deformation condition (1), where the cross-sections Si = S, Young’s modules Ei = E, and the lengths li are expressed as multiples of a uniform length l, the following is true for the energy change in the entire system under the NAB force:
l E · S F i · F i N A B = 0
N A B 2 · 2 · F B x N A B + F B y + F e C y F B x N A B + F B y + 2 · 2 · N A B F B x F B x N A B + F B y F e C x + F e C y = 0
N A B = 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3
By substituting NAB from Equation (66) into the system of Equations (60)–(63), the following is derived:
F A C = 2 · F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x 2 · 2 + 2 · F e C y 4 · 2 + 3 + F B y
F B C = F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3 + F B y
F B D = 2 · 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3 F B x
F C D = F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y + 4 · 2 + 2 · F e C x 2 · 2 + 1 · F e C y 4 · 2 + 3 + F B y
The individual elements of the matrix in Equation (54) after deriving by FeCx are as follows:
N A B · N A B F e C x = 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3 2
F A C · F A C F e C x = F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3 + F B y + F e C y · 2 4 · 2 + 3
F B C · F B C F e C x = F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3 + F B y · 1 4 · 2 + 3
F B D · F B D F e C x = 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3 F B x · 2 4 · 2 + 3
F C D · F C D F e C x = F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y + 4 · 2 + 2 · F e C x 2 · 2 + 1 · F e C y 4 · 2 + 3 + F B y · 4 · 2 + 2 4 · 2 + 3
The individual elements of the matrix in Equation (54) after deriving by FeCy read as follows:
N A B · N A B F e C y = 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3 · 2 · 2 + 1 4 · 2 + 3
F A C · F A C F e C y = F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x 2 · 2 + 2 · F e C y 4 · 2 + 3 + F B y · 2 · 2 · 2 + 2 4 · 2 + 3
F B C · F B C F e C y = F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3 + F B y · 2 · 2 + 1 4 · 2 + 3
F B D · F B D F e C y = 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y F e C x + 2 · 2 + 1 · F e C y 4 · 2 + 3 F B x · 2 · 2 · 2 + 1 4 · 2 + 3
F C D · F C D F e C y = F B x 2 · 2 · 2 + 1 · F B x + 2 + 1 · F B y + 4 · 2 + 2 · F e C x 2 · 2 + 1 · F e C y 4 · 2 + 3 + F B y · 2 · 2 + 1 4 · 2 + 3
In Equations (54) and (71)–(80), following the theorem, a zero value is substituted into for the vector FeC (FeC = 0) to obtain the resulting deflection δC of the node C.

3. Building a Trusses Structure in MATLAB—Simscape Multibody

The Simscape Multibody environment [1,2,3,4] enables simulations of mechanical systems in space. It formulates and solves the equations of motion for the entire mechanical system and also provides visualization of the system dynamics. This allows for the examination of various dynamic and static processes on the model. Examining kinematic and dynamic quantities on advanced models can be quite challenging. Dealing with spatial assignments can be tough without an understanding of vector calculus and rotation matrix representations. The probability of error in derivation and computation is considerably high. Utilizing software tools with predefined blocks representing physical solids can assist in resolving such assignments. There are different programs available for calculating trusses systems and various tools for simulating the behavior of structures made from various materials. In such simulation program environments, there are different blocks such as “Flexible Beams”. These blocks simulate a slender bar with constant cross-section with small and linear deformations, including extension, bending, and torsion. Thus, a flexible body can be represented as a system composed of multiple bodies (multibody) [22]. In Figure 9, the model of the trusses system from Figure 1 is loaded with the external force vector FB at node B with the calculation results. The following values have been defined:
FB = [–2, –10]T kN, bar lenghts l = 1 m, lAB = l, lBC = l, lCD = l, lAC = l, lBD = l, bar diameters are the same with d = 0.01 m. Young’s modulus E is 210 GPa, shear modulus G is 79 GPa, and density is 7800 kg/m3. Poisson’s ratio is 0.28. The values of proportional or Rayleigh damping are left “default” with respect to computational practicality bm = 0.01 s−1, bk = 0.01 s. The Rayleigh model [23,24,25] defines the damping matrix C as a linear combination of the mass matrix M and the stiffness matrix K as follows:
C = b m · M + b k · K ,
with bm being a mass coefficient and bk being a stiffness coefficient. These are the scalar coefficients. The simulation time is also “default” in the model settings and equals t = 10 s.
As already mentioned, for the sake of simplicity, so that we do not have to adjust and adapt the values of t, bm, and bk to the level of external load in the form of force FB and cross-section Si, the so-called multiplication constant–con, is introduced. Its role is to proportionally shift the simulation to the order of units depending on the value of the external force vector FB as well as the uniform cross-section of the bar Si. Practically, we can also start from the normal stress in the most stressed bar if the cross-sections of the Si bars of a given structure would be different. This avoids unnecessary changes in the defined coefficients bm for the mass coefficient M, and bk for the stiffness coefficient K in Equation (81) in the Rayleigh damping model. For the multiplication constant, the following applies:
c o n = F B 1200 · S i
This simple modification ensured an increase of two to four orders of magnitude in the accuracy of the calculation in accordance with theory within an unlimited range of external FB force loading. This multiplication constant can be optimized for the highest accuracy based on Equations (5) and (6), provided that the following holds with the smallest possible deviation:
F B x = N A B F B D 2
F B y = F B C + F B D 2
The magnitudes of the components in the force vector FB are known to us, and the other forces are computational outputs.
Figure 10 shows a visualization of the trusses system model in the Mechanics Explorers window of the MATLAB—Simscape Multibody environment. It is a running visualization in the case of a properly constructed model.
The individual systems forming a particular trusses system should be explained. The World Frame subsystem is formed by combining the World Frame and Solver Configuration library blocks, these blocks being in the “default” configuration, see Figure 11.
Subsystems of nodes labelled Node_A and Node_D are formed as follows in Figure 12:
The blocks “Point”—Graphic sphere and “Point Cloud”—Frame visualization are used only for visualizations. Physically, they are not involved in the given model. The FA force vector value is measured directly from the “Revolute Joint”—Total force sensing block. The bars are connected using “Revolute Joint” joints in the “default” setting. The block “Interpreted MATLAB Function” –u(1:2) defines a two-dimensional force vector in the FA, FB plane, whose z-component is of zero value. The block “Gain”con provides the multiplication by the multiplication constant–con. An explanation of constant–con has been provided in Equations (82)–(84).
Subsystems of nodes labelled Node_B and Node_C are formed as follows in Figure 13:
Similarly, the bars are connected using “Revolute Joint” joints in the “default” setting. The member subsystems labelled Beam_AB, Beam_AC, Beam_BC, Beam_BD, and Beam_CD are identical in structure and are formed as follows in Figure 14:
The “Rigid Transform” blocks ensure that the bar is rotated into the desired plane around the y-axis of the world frame. The NAB force vector value is measured directly from the “Weld Joint” block—Total force sensing. The block “Interpreted MATLAB Function” −u(3) selects the z-component of the force vector in the NAB bar. The block physically representing the bar is a “Flexible Cylindrical Beam” block type. It defines the individual parameters such as bar length lAB, bar diameter d, Young’s modulus E, shear modulus G, density, and proportional Rayleigh damping values bm, bk.
Subsystems labelled Node_Deflection_B, Node_Deflection_C are designed to measure the deflection of nodes B, C, and are formed as follows in Figure 15:
The “Transform Sensor”—Translation [x, y, z] blocks provide deflection measurement relative to the world frame. The remaining blocks select only those components of the vector that define the deflection in the x, y plane relative to the original position.
Figure 16 illustrates the control measurement of the reaction forces to optimize the multiplication constant–con based on Equations (83) and (84).

4. Building a Trusses Structure in the SOLIDWORKS—Weldments Tool

To verify the calculation of the given trusses system, the SOLIDWORKS environment was used, and a similar model was developed using the “Weldments” tool, which allows the welded structure to be designed as a single multibody part. This tool yielded the most accurate results when simulated on bars under bending, torsion, tension–compression, and continuous loads against the theory.
Load FB = [−2, −10]T kN, bar lengths l = 1 m, lAB = l, lBC = l, lCD = l, lAC = l, lBD = l, bar diameters are the same with d = 0.01m full profile. The material used is “Plain Carbon Steel” with Young’s modulus E is 210 GPa, shear modulus G of 79 GPa and density of 7800 kg/m3. Poisson’s ratio is 0.28.
A detailed procedure for developing such a model is not provided in this section as it is available in [26,27,28,29]. It should be noted that the node where the diagonal bars intersect is not a fixed joint. This is also evident when loaded with the visible deformation in Figure 17b. A comparison of the individual results from MATLAB—Multibody, SOLIDWORKS—Weldments tool, and the theoretical calculations are summarized in the table in Section 5.

5. Results

A comparison of the individual results from MATLAB—Multibody, SOLIDWORKS—Weldments tool, and the theoretical calculation is presented in the Table 1 overview.
Firstly, the respective values are substituted into the individual equations and the results are quantified:

5.1. Deriving from the Theory

By substituting the respective values into the individual equations for NAB, FAC, FBC, FBD, and FCD, the following results can be derived:
N A B = 2 · 2 · 2 + 1 · 2000 + 2 + 1 · 10,000 4 · 2 + 3 = 7.346546206455528 · 10 + 03
From the equilibrium in the nodes, the reaction forces Fi in the bars are derived:
F A C = 2 · 2000 F A B 10,000 = 6.580977466707121 · 10 + 03
F B C = 2000 F A B 10,000 = 4.653453793544472 · 10 + 03
F B D = 2 · F A B + 2000 = 7.561158157023830 · 10 + 03
F C D = 2000 F A B + 10,000 = 4.653453793544472 · 10 + 03
Consequently, the Ni forces in the bars are as follows:
N A C = F A C = 6.580977466707121 · 10 + 03
N B C = F B C = 4.653453793544472 · 10 + 03
N B D = F B D = 7.561158157023830 · 10 + 03
N C D = F C D = 4.653453793544472 · 10 + 03

5.2. The MATAB and SOLIDWORKS Results

For ease of overview, the individual results are arranged in Table 1.
Table 1. A comparison of theoretical results of forces NAB, NAC, NBC, NBD, NCD acting in bars, nodes A, B, FAx, FAy, FBx, FBy (not reactions) and deflections δBx, δBy, δCx, δCy with the MATLAB—Multibody, SOLIDWORKS—Weldments tool results.
Table 1. A comparison of theoretical results of forces NAB, NAC, NBC, NBD, NCD acting in bars, nodes A, B, FAx, FAy, FBx, FBy (not reactions) and deflections δBx, δBy, δCx, δCy with the MATLAB—Multibody, SOLIDWORKS—Weldments tool results.
Parameter [Unit]Theoretical
Calculation
MATLAB
Not Optimized
MATLAB
Optimized
SOLIDWORKS
NAB [N]−7.34654620 × 103−7.34654003 × 103−7.34654622 × 103−7.34590527 × 103
NAC [N]−6.58097746 × 103−6.58097926 × 103−6.58097773 × 103−6.58031299 × 103
NBC [N]4.65345379 × 1034.65345692 × 1034.65345392 × 1034.65308789 × 103
NBD [N]7.56115815 × 1037.56116105 × 1037.56115816 × 1037.55990186 × 103
NCD [N]4.65345379 × 1034.65345484 × 1034.65345391 × 1034.65298145 × 103
FAx [N]−1.20000000 × 104−1.19999982 × 104−1.20000002 × 104−1.19988418 × 104
FAy [N]−4.65345379 × 103−4.65344188 × 103−4.65345386 × 103−4.65380371 × 103
FDx [N]1.00000000 × 1049.99999827 × 1031.00000000 × 1049.99884180 × 103
FDy [N]−5.34654620 × 103−5.34655811 × 103−5.34654630 × 103−5.34619678 × 103
FBx 1 [N]−2.00000000 × 103−1.99999177 × 103−2.00000002 × 103
FBy 1 [N]−1.00000000 × 104−1.00000051 × 104−1.00000001 × 104
δBx [m]−4.45424435 × 10−4−4.45424989 × 10−4−4.45424437 × 10−4−4.45385580 × 10−4
δBy [m]−1.36229734 × 10−3−1.36229743 × 10−3−1.36229738 × 10−3−1.36211328 × 10−3
δCx [m]2.82141018 × 10−42.82140499 × 10−42.82141045 × 10−42.82112334 × 10−4
δCy [m]−1.08015632 × 10−3−1.08015649 × 10−3−1.08015632 × 10−3−1.07999449 × 10−3
1 Verification of the calculation of the magnitude of the external loading force FB based on the equilibrium of node B, Equations (83) and (84). It serves only for the optimization of the multiplication–con.
It can be noticed that the accuracy in MATLAB—Multibody is guaranteed to six decimal places, while in SOLIDWORKS—Weldments tool, it is guaranteed to two decimal places. It is important to note that SOLIDWORKS also offers many other deliverables and extensions that would have to be completed in MATLAB. Additionally, the calculation in MATLAB has been optimized using –con to ensure the calculation is not tedious and delivers interesting results. If the simulation had not been proportionally shifted to lower values using the –con constant, the computation would have been tedious, and the accuracy would have been approximately four decimal places. Alternatively, it would be necessary to increase the values of damping bk and adjust the simulation time accordingly.
In MATLAB, for a more complex structure, individual blocks representing a repeating part can be created, and the entire structure can be further developed for static or dynamic assessment—see Figure 18.
Figure 19 presents a visualization of the trusses system model from Figure 18 in the Mechanics Explorers window of the MATLAB—Simscape Multibody environment.

6. Discussion

The Simscape Multibody toolbox from MATLAB is primarily designed to simulate mechanical systems in space, detecting their kinematic and dynamic quantities. The market offers numerous applications and programs for solving trusses systems. When individual tests were conducted on the flexible beam models available in the library, very good results were obtained, with less errors than SOLIDWORKS. Deformation includes additions due to extension, bending, and torsion. The stiffness and inertia properties of the body are calculated based on its geometry and material properties. Developing the model involves correctly assembling a few blocks to calculate the forces and deflections of the mechanical system. Regarding deflections, Multibody is an interesting choice compared to the classical mathematical solution of the equations. While testing the trusses system, the possibility of achieving better results in the simplest possible way caught our attention. The proportional damping type achieved the best results with the Rayleigh damping model. For more accuracy in the calculation than two to four decimal places, the damping needs to be adjusted to the load rate, bar length, cross-section, and simulation time. In order to simplify the entire issue, we have relied on the basic idea that all processes in the body are reversible and linear, following principles such as Hooke’s law. From a practical standpoint, the model should preferably be founded on the default settings of the components and the model. We intended to avoid adjusting and adapting the values of the simulation time t, the coefficients of proportionality bm, bk to the level of the external load in the form of the force FB and the cross-section Si. Instead, we considered proportionally shifting the simulation based on the external force vector FB and the uniform cross-section Si, which introduced a multiplication constant–con. We adjusted its value to the equilibrium of forces at node B, where the load is known. It would also be beneficial to consider further enhancements, such as “deep learning”, to identify a better optimum for different systems. Additionally, it is theoretically feasible to begin with normal stress in the most heavily stressed bar if the cross-sections of the Si bars in a particular structure were different. In practical terms, the current level of accuracy in the calculation may not be significant for the designer. However, it indicates the possibility of conducting a more thorough model assessment. It is not always efficient to derive the equations or to have other suitable software available. Therefore, it is beneficial to be aware of this possibility. There are only a few published works using Simscape Multibody for trusses systems.
The calculations were also verified in SOLIDWORKS using the Simulation tool. The entire structure was developed using the Weldments tool. Developing the model was not time-consuming, and it is possible to analyze various parameters and outputs, such as forces at different points and the second moments of area. The agreement against the theoretical calculations was accurate to two decimal places, which is sufficient in many cases.

7. Conclusions

Our contribution focuses on further possibilities of utilizing built-in tools that are part of the software package and that we use in our work and research activities. We were interested in the results in terms of accuracy and to what extent the computation differs from the theoretical calculation using the tools we employ. The potential reliance on simulations in the future could help avoid the need for complex theoretical calculations. As we can see in Section 2, the computation is time-consuming and risky in terms of error occurrence, despite the fact that the structure is not complex. In practice, there may not always be time for a validation calculation in the theoretical domain (proper model creation, inclusion of all deficiencies, incorrect assumptions, etc.).
As mentioned in Section 4 of the discussion, the Simscape Multibody Toolbox from MATLAB is primarily intended for simulating mechanical systems in space and determining their kinematic and dynamic quantities. We have noticed that it could also be used for the static assessment of truss systems, for which there are countless programs available, most of which need to be purchased. Currently, there are hardly any published scientific studies regarding this tool for rod systems and their static tasks. Therefore, with this article, we want to highlight the existence of a potential solution such as this. Many aspects, including the assessment of buckling stability, can be further developed if necessary.
We also consider the introduction of simple proportionality in the form of the constant “con” interesting, as it essentially shifts the entire calculation into an area without overload, and thus earlier into a stable state, where the process can practically be considered static.

Author Contributions

Draft concept, theoretical analysis, Š.O.; model design and data processing in MATLAB, Š.O.; overview, supervision, approval, J.S. (Jozef Svetlík); project, administration methodology, J.S. (Jozef Svetlík), J.S. (Ján Semjon), R.J. and M.D. All authors have read and agreed to the published version of the manuscript.

Funding

This paper was prepared with the support of the grant projects KEGA 043TUKE—4/2024 Creation of prospective educational tools for the field of additive manufacturing with the implementation of progressive elements of virtual reality, KEGA 005TUKE—4/2025 Synthesis of machine vision with elements of artificial intelligence in the context of industrial and service robotics for the study program Robotics and robot technology, VEGA 1/0191/24 Development, optimization, and application of coordinate measurement strategies of geometric parameters and structure of additive products.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Nomenclature

Abbreviations
FEMFinite Element Method
Parametres, variables
A, B, C, DNode, Gusset
UPotential strain energy of the trusses system
F, NNormal force in a bar
FForce vector
MMoment
lBar length
dBar diameter
Scross-section
EThe Young’s modulus of a bar
GShear modulus
DensityDensity
μPoisson’s ratio
δB, δCDeflection vector at node B or C in the plane
FeB, FeCAdditional external force vector at node B or C
CDamping matrix of the Rayleigh damping model
KStiffness matrix of the Rayleigh damping model
MMass matrix of the Rayleigh damping model
bmMass coefficient proportional to the mass matrix M of the Rayleigh damping model
bkStiffness coefficient proportional to the stiffness matrix K of the Rayleigh damping model
tSimulation time
conMultiplication constant
x, y, zCoordinate system axes, or position vector elements
u(i)i—the element of the vector u of the input variable for the function in SIMULINK

References

  1. Mathworks; Simscape. MultibodyTM Getting Started Guide; Mathworks: Natick, MA, USA, 2024. [Google Scholar]
  2. Mathworks. MATLAB for Artificial Intelligence. Available online: https://www.mathworks.com/help/pdf_doc/sm/sm_gs.pdf (accessed on 14 August 2024).
  3. Mathworks; Simscape. MultibodyTM User’s Guide; Mathworks: Natick, MA, USA, 2024. [Google Scholar]
  4. Mathworks. MATLAB for Artificial Intelligence. Available online: https://www.mathworks.com/help/pdf_doc/sm/sm_ug.pdf (accessed on 14 August 2024).
  5. Bauchau, O.A.; Craig, J.I. Euler—Bernoulli beam theory. In Structural Analysis; Springer: Dordrecht, The Netherlands, 2009. [Google Scholar]
  6. Öchsner, A. Euler—Bernoulli beam theory. In Classical Beam Theories of Structural Mechanics; Springer: Cham, Switzerland, 2021; pp. 7–66. [Google Scholar]
  7. Euler-Bernoulli Beams: Bending, Buckling, and Vibration. Available online: https://ocw.mit.edu/courses/2-002-mechanics-and-materials-ii-spring-2004/bc25a56b5a91ad29ca5c7419616686f7_lec2.pdf (accessed on 1 August 2024).
  8. Šarišský, P. Zpracování Algoritmu pro Řešení Deformace Prutových Soustav v Reálném Čase [Development of an Algorithm for Real—Time Deformation Analysis of Trusses Systems]. Bachelor’s Thesis, Brno University of Technology, Brno-Královo Pole, Czech Republic, 2017. [Google Scholar]
  9. Bakošová, A.; Krmela, J.; Handrik, M. Computing of truss structure using MATLAB. Manuf. Technol. 2020, 20, 279–285. [Google Scholar] [CrossRef]
  10. ANSYS. ANSYS Fluent User Guide; ANSYS: Canonsburg, PA, USA, 2017; Available online: http://www.ansys.com (accessed on 14 August 2024).
  11. Madenci, E.; Guven, I. Fundamentals of ANSYS. In The Finite Element Method and Applications in Engineering Using ANSYS®; ANSYS: Canonsburg, PA, USA, 2006; pp. 15–35. [Google Scholar]
  12. Thompson, M.K.; Thompson, J.M. ANSYS Mechanical APDL for Finite Element Analysis; Butterworth—Heinemann: Oxford, UK, 2017. [Google Scholar]
  13. Trebuňa, F.; Šimčák, F. Odolnosť Prvkov Mechanických Sústav [Resistance of Mechanical System Components]. Technical University of Košice: Košice, Slovakia, 2004. [Google Scholar]
  14. Jones, R.M. Buckling of Bars, Plates, and Shells; Bull Ridge Corporation: Blacksburg, VA, USA, 2006. [Google Scholar]
  15. Cai, Q.; Feng, R.; Zhang, Z. Topology optimization of truss structure considering nodal stability and local buckling stability. Structures 2022, 40, 64–73. [Google Scholar] [CrossRef]
  16. Gambhir, M.L. Stability Analysis and Design of Structures; Springer Science & Business Media: Dordrecht, The Netherlands, 2004. [Google Scholar]
  17. Manguri, A.; Saeed, N.; Szczepanski, M.; Jankowski, R. Buckling and shape control of prestressable trusses using optimum number of actuators. Sci. Rep. 2023, 13, 3838. [Google Scholar] [CrossRef] [PubMed]
  18. Janíček, P.; Ondráček, E.; Vrbka, J. Mechanika těles. Pružnost a Pevnost I [Mechanics of Bodies. Elasticity and Rigidity I]; Vysoké učení Technické: Brno, Czech Republic, 1992. [Google Scholar]
  19. Karnovsky, I.A.; Lebed, O. Advanced Methods of Structural Analysis; Springer Nature: Berlin/Heidelberg, Germany, 2021. [Google Scholar]
  20. Hughes, A.J.; Merrill, C. Method of joints: Theory and practice of designing, building, and testing trusses. Technol. Eng. Teach. 2020, 80, 28. [Google Scholar]
  21. Florian, Z.; Pellant, K.; Suchánek, M. Technická Mechanika I—Statika [Technical Mechanics I—Statics]; Vysoké učení Technické v Brně: Brno, Czech Republic, 2004. [Google Scholar]
  22. Miller, S.; Soares, T.; Weddingen, Y.V.; Wendlandt, J. Modeling Flexible Bodies with Simscape Multibody Software. An Overview of Two Methods for Capturing the Effects of Small Elastic Deformations; MathWorks: Natick, MA, USA, 2017. [Google Scholar]
  23. Králik, J. Modelovanie Konštrukcií v Metóde Konečných Prvkov [Finite Element Modelling of Structures]; ANSYS: Canonsburg, PA, USA, 2009. [Google Scholar]
  24. Adhikari, S.; Phani, A.S. Rayleigh’s classical damping revisited. In Proceedings of the International Conference on Civil Engineering in the New Millennium: Opportunities and Challenges, Howrah, India, 11–14 January 2007. [Google Scholar]
  25. Rahman, M.H.; Gupta, C. Computation of Rayleigh damping coefficient of a rectangular submerged floating tunnel (SFT). SN Appl. Sci. 2020, 2, 936. [Google Scholar] [CrossRef]
  26. Planchard, D. Solidworks 2014 Reference Guide; SDC Publications: Mission, KS, USA, 2014. [Google Scholar]
  27. Kurowski, P. Engineering Analysis with SolidWorks Simulation 2015; SDC Publications: Mission, KS, USA, 2015. [Google Scholar]
  28. Solidworks. Available online: https://www.solidworks.com/ (accessed on 1 August 2024).
  29. Mechanical Engineer. Available online: https://shantgananian.github.io (accessed on 1 August 2024).
Figure 1. Structure of the trusses system loaded by the force at node B.
Figure 1. Structure of the trusses system loaded by the force at node B.
Applsci 14 09547 g001
Figure 2. Structure of the trusses system loaded by the force at node B after release from the bonds at node A, D, and release of the bar between nodes AB.
Figure 2. Structure of the trusses system loaded by the force at node B after release from the bonds at node A, D, and release of the bar between nodes AB.
Applsci 14 09547 g002
Figure 9. Structure of the trusses system loaded by the external force vector FB at node B in MATLAB—Simscape Multibody, based on Figure 1.
Figure 9. Structure of the trusses system loaded by the external force vector FB at node B in MATLAB—Simscape Multibody, based on Figure 1.
Applsci 14 09547 g009
Figure 10. Visualization of the MATLAB—Simscape Multibody model of the trusses system, in the Mechanics Explorers window: (a) Unloaded; (b) Loaded with visible deformation. The movable parts (unknown calculated shift) are marked in red, and the fixed parts of the construction are marked in green.
Figure 10. Visualization of the MATLAB—Simscape Multibody model of the trusses system, in the Mechanics Explorers window: (a) Unloaded; (b) Loaded with visible deformation. The movable parts (unknown calculated shift) are marked in red, and the fixed parts of the construction are marked in green.
Applsci 14 09547 g010
Figure 11. The World Frame subsystem is formed by combining the World Frame and Solver Configuration library blocks.
Figure 11. The World Frame subsystem is formed by combining the World Frame and Solver Configuration library blocks.
Applsci 14 09547 g011
Figure 12. Detailed view of nodes A, D: (a) Node_A; (b) Node_D.
Figure 12. Detailed view of nodes A, D: (a) Node_A; (b) Node_D.
Applsci 14 09547 g012
Figure 13. Detailed view of nodes B, C: (a) Node_B; (b) Node_C.
Figure 13. Detailed view of nodes B, C: (a) Node_B; (b) Node_C.
Applsci 14 09547 g013
Figure 14. An example of the bar subsystem labelled Beam_AB.
Figure 14. An example of the bar subsystem labelled Beam_AB.
Applsci 14 09547 g014
Figure 15. Detailed view of the node deflection measurement subsystems labelled Node_Deflection_B and Node_Deflection_C: (a) Node_B node deflection; (b) Node_C node deflection.
Figure 15. Detailed view of the node deflection measurement subsystems labelled Node_Deflection_B and Node_Deflection_C: (a) Node_B node deflection; (b) Node_C node deflection.
Applsci 14 09547 g015
Figure 16. Subsystem of control measurement of reaction forces for optimizing the multiplication constant–con based on Equations (83) and (84).
Figure 16. Subsystem of control measurement of reaction forces for optimizing the multiplication constant–con based on Equations (83) and (84).
Applsci 14 09547 g016
Figure 17. The figure displays a similar trusses structure developed with the Weldments tool in SOLIDWORKS: (a) Unloaded with indicated reactions at nodes A, D; (b) Loaded with visible deformation of the bars.
Figure 17. The figure displays a similar trusses structure developed with the Weldments tool in SOLIDWORKS: (a) Unloaded with indicated reactions at nodes A, D; (b) Loaded with visible deformation of the bars.
Applsci 14 09547 g017
Figure 18. An example of a system composed of repeating subsystems to develop a more complex structure.
Figure 18. An example of a system composed of repeating subsystems to develop a more complex structure.
Applsci 14 09547 g018
Figure 19. Visualization of the model from Figure 18 of the loaded trusses system from MATLAB—Simscape Multibody, in the Mechanics Explorers window, with the visible deformation.
Figure 19. Visualization of the model from Figure 18 of the loaded trusses system from MATLAB—Simscape Multibody, in the Mechanics Explorers window, with the visible deformation.
Applsci 14 09547 g019
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ondočko, Š.; Svetlík, J.; Jánoš, R.; Semjon, J.; Dovica, M. Calculation of Trusses System in MATLAB—Multibody. Appl. Sci. 2024, 14, 9547. https://doi.org/10.3390/app14209547

AMA Style

Ondočko Š, Svetlík J, Jánoš R, Semjon J, Dovica M. Calculation of Trusses System in MATLAB—Multibody. Applied Sciences. 2024; 14(20):9547. https://doi.org/10.3390/app14209547

Chicago/Turabian Style

Ondočko, Štefan, Jozef Svetlík, Rudolf Jánoš, Ján Semjon, and Miroslav Dovica. 2024. "Calculation of Trusses System in MATLAB—Multibody" Applied Sciences 14, no. 20: 9547. https://doi.org/10.3390/app14209547

APA Style

Ondočko, Š., Svetlík, J., Jánoš, R., Semjon, J., & Dovica, M. (2024). Calculation of Trusses System in MATLAB—Multibody. Applied Sciences, 14(20), 9547. https://doi.org/10.3390/app14209547

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop