Stiffness Matrix Method of 2D Truss Syst
Stiffness Matrix Method of 2D Truss Syst
Ayodele AKIN-ADAMU
Dokuz Eylül Üniversitesi, Fen Bilimleri Enstitüsü, Bornova, 35100, İzmir
E-ileti: [email protected]
ABSTRACT
The truss system is the most efficient and widely used structural system used by structural engineers to span long
distances and to provide beautiful shape forms in external building façades. This system can be used as support
system for floors, roofs and bridges. The truss system is general classified as 2D or 3D structural system. While
the 2D truss system has the capacity to span up to 40m (clear span), its 3D counterpart can span up to 90m (clear
span) if supports are properly placed around it. The stiffness method of analysis is one of the 2 methods used for
structural analysis of plane truss system by matrix methodology. Its other counterpart is named the flexibility or
force method. The stiffness method is also referred to as Matrix Displacement Method in many literatures.
MATLAB is a programming and numerical computing software used by scientists and engineering professionals
all over the world to analyze data, develop algorithms and create models. MATLAB lends itself to structural matrix
method of analysis because of its extraordinary numerical computing power using matrix. This paper aims to
analyze a simple 2D truss system with six structural members using MATLAB software for calculation of the
member axial deflections and internal axial member force values. An algorithm is developed to write the MATLAB
code to solve this problem and each section of the MATLAB code is explained in this paper. The paper also aims
to provide 1st principle derivation for general stiffness matrix method of 2D plane truss structural system. A
popular computer software called staad.pro is used to check the validity of the numerical results from MATLAB.
Keywords: Plane truss, 3D Truss Structural Analysis, MATLAB, Staad.pro and matrix stiffness method,
Numerical Analysis and Force method.
.
INTRODUCTION
In public building construction projects such as sport facilities, religious buildings, stadiums
etc. the use of truss structural system to support roof is very important because this building
type usually require clear span of up to 50m without internal supports. The truss structural
system is the most efficient support system for this range of span. Also, enormous weight of
material will general be needed for this system, so there is a need to accurately determine the
internal forces in the members to design economy and safe structure. This structural system
may also be statically indeterminate to a very large order in which the use of simple method of
analysis such as the method of joints or section method is ineffective. The use of matrix method
makes its very simple for analyzing this structural system. Many programs software either use
matrix method or finite element method of analysis to solve structural analysis problems. The
use of Force displacement method (stiffness method) of matrix analysis is explained in this
paper.
The truss system can be built with either steel, aluminum or wood. The young modulus E of
steel and aluminum is approximately equivalent to 205 and 68.948kN/mm2 respectively. The
value of this engineering property E is very important in the computation of the deflection
values at each node of the truss structural system. In many literatures EA, which is the product
of young modulus and the cross-sectional area of the structural material is termed axial stiffness.
Ayodele Akin-Adamu
In this paper, the stiffness matrix method formula will be proved. The basic steps of
programming the stiffness method will be listed and the corresponding MATLAB code will be
written to compute the global stiffness matrix, compute deflection and internal axial forces of
the truss structural system.
In 2D truss system, it is assumed that each node has 2 degrees of freedom (DOF) in the x and
y. I.e., each node can only move translationally in the x and y direction when loaded with
external actions. The nodes in the system cannot also rotate. Figure 1 shows an example of a
2D plane truss in the x and y plane. This figure will be used to explain stiffness matrix
methodology (SMM) for analysis of plane truss system in this paper.
There are 2 classes of coordinate axes used in SMM. It includes:
1. Global coordinate Axis
2. Local coordinate Axis.
Figure 4: Member axial force, F (on left) and axial displacement, Ak (on right).
Ayodele Akin-Adamu
Figure 5: Local Member forces (on left) and Local member displacements (on right).
Figure 6: Global Member forces (on left) and Global member displacements (on right).
From Figure 5, the local member force and the local member displacement variables can be
written as column vectors 𝐟𝐤 and 𝐚𝐤 respectively as shown below:
⎡f ⎤
⎢f ⎥
𝐟𝐤 = ⎢ ⎥ (1)
⎢f ⎥
⎢ ⎥
⎣f ⎦
a
⎡ ⎤
a
[ 𝐚𝐤 ] = ⎢⎢ ⎥
⎥ (2)
a
⎢ ⎥
⎣a ⎦
Also from Figure 6, the global member force and the global member displacement variables
can be written as column vectors 𝐟𝐤 and 𝐚𝐤 respectively as shown below:
Stiffness Matrix Method of 2D Truss Systems Using MATLAB
f
⎡f ⎤
[ 𝐟𝐤 ] = ⎢⎢ ⎥
⎥ (3)
f
⎢ ⎥
⎣f ⎦
a
a
[ 𝐚𝐤 ] = a (4)
a
By comparing Figure 4 and 5, F for any member k can be denoted by the column vectors shown
below respectively because f , f , a and a are assumed to be equal to 0 and f and f
equal to -F and F respectively.
−𝐅 −𝟏
0 0
𝐟𝐤 = = *𝐅 (5)
𝐅 𝟏
0 0
𝑨𝑲 = 𝑎 − 𝑎 (6)
Equation 6 can also be written in matrix form to give Ak as shown below:
a
⎡ ⎤
⎢ a ⎥
𝑨𝑲 = [−1 0 1 0] * ⎢ ⎥ (7)
a
⎢ ⎥
⎣a ⎦
Figure 7: Local Member forces (on left) and Local member displacements (on right) with
angle 𝜃 defined.
Ayodele Akin-Adamu
Figure 6: Global Member forces (on left) and Global member displacements (on right) with
angle 𝜃 defined.
The angle 𝜃 is a very important parameter in the stiffness matrix methodology of plane truss
system because it is one of the parameters for calculation of the global stiffness matrix of each
member. Each member has its unique 𝜃 . These angles ae the angles between the global x axis
and each component member measured in the counterclockwise direction.
Again, comparing Figure 1 and 7, 4 equations can be written for the relationship between the
axial force F and the local member forces (f f f and f ) and another four equations for the
axial displacement Ak and the local member displacements (a a a and a ).
f cos 𝜃 - f sin 𝜃 + f ∗ 0 + f ∗ 0 = −𝐹
f sin 𝜃 + f cos 𝜃 + f ∗ 0 + f ∗ 0 = 0
f ∗ 0+ f ∗0 +f cos 𝜃 - f sin 𝜃 = 𝐹
f ∗ 0+ f ∗0 +f sin 𝜃 + f cos 𝜃 = 0
The 4 equations above can be written in matrix form shown below for the local member
forces:
cos θ − sin θ 0 0 ⎡f ⎤ −F
⎢f ⎥
sin θ cos θ 0 0
⎢ ⎥= 0 (8)
0 0 cos θ − sin θ ⎢f ⎥ F
0 0 sin θ cos θ ⎢ ⎥ 0
⎣f ⎦
a cos θ - a sin θ + a ∗ 0 + a ∗ 0 = −A
a sin θ + a cos θ + a ∗ 0 + a ∗ 0 = 0
a ∗ 0+ a ∗0 +a cos θ - a sin θ = A
a ∗ 0+ a ∗0 +a sin θ + a cos θ = 0
Stiffness Matrix Method of 2D Truss Systems Using MATLAB
The 4 equations above can be written in matrix form shown below for the local member
displacements:
cos θ − sin θ 0 0 a
⎡ ix ⎤ −A
sin θ cos θ 0 0 ⎢ aiy ⎥ 0
0 0 cos θ − sin θ ⎢ ajx ⎥ = A
(9)
0 0 sin θ cos θ ⎢ ⎥
⎣ ajy ⎦ 0
Another comparison of Figure 1 and 8, 4 equations can be written for the relationship between
the axial force F and the global member forces ( f f f and f ) and another four equations
for the axial displacement Ak and the local member displacements (a a a and a ).
f cos 𝜃 + f sin 𝜃 + f ∗ 0 + f ∗ 0 = −𝐹
−f sin 𝜃 + f cos 𝜃 + f ∗ 0 + f ∗ 0 = 0
f ∗ 0+ f ∗0 +f cos 𝜃 + f sin 𝜃 = 𝐹
f ∗ 0+ f ∗0 -f sin 𝜃 + f cos 𝜃 = 0
The 4 equations above can be written in matrix form shown below for the global member
forces:
f −F
cos θ sin θ 0 0 ⎡ ix ⎤
−sin θ cos θ 0 0 ⎢ fiy ⎥ 0
0 0 cos θ sin θ ⎢ fjx ⎥= F
(10)
0 0 − sin θ cos θ ⎢ ⎥
⎣ fjy ⎦ 0
a cos 𝜃 + a sin 𝜃 + a ∗ 0 + a ∗ 0 = −A
−a sin 𝜃 + a cos 𝜃 + a ∗ 0 + a ∗ 0 = 0
a ∗ 0+ a ∗0 +a cos 𝜃 + a sin 𝜃 = A
a ∗ 0+ a ∗0 -a sin 𝜃 + a cos 𝜃 = 0
The 4 equations above can be written in matrix form shown below for the global member
displacements:
cos θ sin θ 0 0 aix −A
−sin θ cos θ 0 0 aiy 0
0 0 cos θ sin θ ajx = A (11)
0 0 − sin θ cos θ ajy 0
By substituting equation (5) in (8):
cos θ − sin θ 0 0 −1 −F
sin θ cos θ 0 0 0 *𝐅= 0
0 0 cos θ − sin θ 1 F
0 0 sin θ cos θ 0 0
Ayodele Akin-Adamu
− cos θ −F
− sin θ
*𝐅= 0 (12)
cos θ F
sin θ 0
By substituting equation (5) in (9):
By applying hookies law of elasticity, the axial force (F) in a truss member is directly
proportional to its displacement (A)
𝐅=K *A (13)
×
Where K = (14)
5. The global stiffness matrix of each member is calculated by using equation (19). Each
global member stiffness matrix is also labelled with the degree of freedom number at
the start and end node. The label for member 1 in the truss example is shown below.
1 2 3 4
1
× 2
𝐾 =
3
4
Note that if the arrowhead points to node 1, 𝐾 matrix will change to this order shown
below:
3 4 1 2
3
× 4
𝐾 =
1
2
6. Then the support system, i.e., roller or pinned support is assumed to develop stiffness
of infinity value in the direction of degree of freedom. For example, in the truss example
above the supports provide restrain at node 1, 2, 7 and 8. A stiffness of infinity is
assumed at K (1,1), K (2,2), K (7,7) and K (8,8) of the global stiffness matrix of truss
system.
7. The global stiffness matrix, K is finally aggregated from the global member stiffnesses
and the support stiffnesses using the code method. The procedure of aggregation of these
matrices will be illustrated using MATLAB.
8. The global axial displacement matrix, DS at each node is computed using the formula
below.
[𝐷𝑆] = [𝐾 ] [𝑃 ] (20)
Where 𝑃 is column vector of the external point loads at each node points, starting from
degree of freedom 1 to the last degree of freedom.
9. The global axial member displacement matrix, 𝐷𝑆 at each node is deduced from DS
in step 8.
10. The global member axial force is finally determined from the product of the matrix of
the global member stiffness matrix and the global axial displacement matrix of each
member using the formula below:
[𝑃 ] = [𝐾 ][𝐷𝑆 ] (21)
Stiffness Matrix Method of 2D Truss Systems Using MATLAB
% K = [c*c, c*s, -c*c, -c*s; c*s, s*s, -c*s, -s*s; -c*c, -c*s, c*c, c*s; -c*s, -s*s, c*s, s*s]/L; end
% and L and returns the matrix of the global member stiffness, K1 to K11.
1st Element
THETA1 = 0
L1 = 2
Ayodele Akin-Adamu
K1 = 4×4
0.5000 0 -0.5000 0
0 0 0 0
-0.5000 0 0.5000 0
0 0 0 0
2nd Element
THETA2 = 0
L2 = 2
K2 = 4×4
0.5000 0 -0.5000 0
0 0 0 0
-0.5000 0 0.5000 0
0 0 0 0
3rd Element
THETA3 = 0
L3 = 2
K3 = 4×4
0.5000 0 -0.5000 0
0 0 0 0
-0.5000 0 0.5000 0
0 0 0 0
4th Element
THETA4 = 0
L4 = 2
K4 = 4×4
0.5000 0 -0.5000 0
0 0 0 0
-0.5000 0 0.5000 0
0 0 0 0
5th Element
THETA5 = 90
L5 = 1
K5 = 4×4
0 0 0 0
0 1 0 -1
0 0 0 0
0 -1 0 1
6th Element
THETA6 = 90
L6 = 1
K6 = 4×4
0 0 0 0
0 1 0 -1
0 0 0 0
0 -1 0 1
7th Element
THETA7 = 90
L7 = 1
K7 = 4×4
0 0 0 0
0 1 0 -1
0 0 0 0
0 -1 0 1
8th Element
THETA8 = 153.4349
L8 = 2.2361
Ayodele Akin-Adamu
K8 = 4×4
9th Element
THETA9 = 26.5651
L9 = 2.2361
K9 = 4×4
10th Element
THETA10 = 153.4349
L10 = 2.2361
K10 = 4×4
11th Element
THETA11 = 26.5651
L11 = 2.2361
K11 = 4×4
K1R = Inf
K2R = Inf
K7R = Inf
K8R = Inf
% then the component stiffness matrices of elements and supports are added as shown below
K = zeros(12)
K = 12×12
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
K(1,1) = K1R;
K(2,2) = K2R;
K(7,7) = K7R;
K(8,8) = K8R;
K = 12×12
% -0.5, -2 and -1kN is located at the 4th, 10th and 12th position according to the degree of freedom numbering.
PS = [0 0 0 -0.5 0 0 0 0 0 -2 0 -1]'
PS = 12×1
-0.5000
0
Stiffness Matrix Method of 2D Truss Systems Using MATLAB
-2.0000
% DS can also be calculated on MATLAB using the inverse function such as DS = inv(K) * PS;
DS = K \ PS;
DS = 12×1
10-3 ×
-0.0267
-0.1005
-0.0312
-0.2315
0.0270
-0.1022
DS1 = DS(1:4)
DS1 = 4×1
10-3 ×
-0.0267
-0.1005
DS2 = DS(3:6)
DS2 = 4×1
10-3 ×
-0.0267
-0.1005
Ayodele Akin-Adamu
-0.0312
-0.2315
DS3 = DS(7:10)
DS3 = 4×1
10-3 ×
0.0270
-0.1022
DS4 = DS(9:12)
DS4 = 4×1
10-3 ×
0.0270
-0.1022
0.0322
-0.2327
DS5 = 4×1
DS6 = 4×1
10-3 ×
-0.0267
-0.1005
0.0270
-0.1022
DS7 = 4×1
10-3 ×
-0.0312
-0.2315
Stiffness Matrix Method of 2D Truss Systems Using MATLAB
0.0322
-0.2327
DS8 = 4×1
10-3 ×
-0.0267
-0.1005
DS9 = 4×1
10-3 ×
0.0270
-0.1022
DS10 = 4×1
10-3 ×
-0.0312
-0.2315
0.0270
-0.1022
DS11 = 4×1
10-3 ×
-0.0267
-0.1005
0.0322
-0.2327
P1 = 4×1
5.4634
-5.4634
P2 = 4×1
0.9390
-0.9390
P3 = 4×1
-5.5366
5.5366
P4 = 4×1
-1.0610
1.0610
P5 = 4×1
P6 = 4×1
0.7012
-0.7012
Stiffness Matrix Method of 2D Truss Systems Using MATLAB
P7 = 4×1
0.4695
-0.4695
P8 = 4×1
3.4634
-1.7317
-3.4634
1.7317
P9 = 4×1
3.5366
1.7683
-3.5366
-1.7683
P10 = 4×1
0.9390
-0.4695
-0.9390
0.4695
P11 = 4×1
1.0610
0.5305
-1.0610
-0.5305