You are on page 1of 15

Contents

LINEAR ALGEBRA........................................................................................................ 2
1.0 INTRODUCTION................................................................................................. 2
2.0 PROBLEM STATEMENT....................................................................................... 3
3.0 SETTING UP THE EQUATION..............................................................................4
4.0 MATLAB PROGRAMMING.................................................................................... 6
5.0 FURTHER INVESTIGATION OF MASS-SPRING-DAMPER SYSTEM........................10

1 | Page
LINEAR ALGEBRA

1.0 INTRODUCTION

Linear Algebra is the branch of mathematics concerned with the study of


vectors, vector spaces (also called linear spaces), linear maps (also called linear
transformations), and systems of linear equations. Vector spaces are a central
theme in modern mathematics; thus, linear algebra is widely used in both abstract
algebra and functional analysis. Linear algebra also has a concrete representation in
analytic geometry and it is generalized in operator theory. It has extensive
applications in the natural sciences and the social sciences, since nonlinear models
can often be approximated by linear ones.

One of the applications of linear algebra is the solution of simultaneous linear


equations. The simplest case is when the the number of unknowns is equal to the
number of equations. Therefore, one could begin with the problem of solving n
simultaneous linear equations in n unknowns.

The history of modern linear algebra dates back to the early 1840s. In 1843, William
Rowan Hamilton introduced quaternions, which describe mechanics in three-
dimensional space. In 1844, Hermann Grassmann published his book Die lineale
Ausdehnungslehre (see References). Arthur Cayley introduced matrices, century. It
was the focus of one of the first international mathematical societies, the
Quaternion Society (1899 - 1913), which aimed to study allied systems of
mathematics.

Matrices were poorly-defined before the development of ring theory within abstract
algebra. With the coming of special relativity, many practitioners gained
appreciation of the subtleties of linear algebra. For instance, in 1914 Ludwik
Silberstein included an introduction to matrices in his Theory of Relativity

2 | Page
(pp.60-2). Meanwhile, in pure mathematics the routine application of Cramer's rule
to solve partial differential equations led to the inclusion of linear algebra in
standard coursework at universities. Edward Thomas Copson wrote, for instance,

More recent developments followed the formulation of the vector space concept into
an algebraic structure, and the growth of functional analysis. One can see a diverse
set of applications in the list of matrices.

2.0 PROBLEM STATEMENT

The equation of motion of a viscously damped system are given by

[ m ] a+ [ c ] v + [ k ] x=0 (a)

Whereby [m], [ c ] , [ k ] are symmetric mass, damping and stiffness matrices

respectively, meanwhile a, c and x are acceleration, velocity and displacement


vectors respectively

Defining

{}
t = x ,
v (b)

Then the equation of motion can be written in the form

[ A ] t =[ B ] t (c)

When t =X e t is assumed, equation (c) reduces to the eigenvalue problem

[ B ] X
[ A ] X=

For a system with

3 | Page
[
[ m ] = 10
0
0
10 ] , [ ] [
[ c ] = 10 5 , [ k ] = 4 2 ,
5 5 2 2 ]
Identify the matrices [ A ] and [ B ] and find the eigenvalues of and the

eigenvectors X given by Equation (d)

a) Write out a program and solve for viscous combination of m, c and k.


b) Explain the physical meanings of your results

4 | Page
3.0 SETTING UP THE EQUATION

m2

m1

Figure 1: Mass Spring Damper System.

Free body diagram;

m1 m2

k 1 x1 c 1 x 1
ma

From the Newtons Second Law,

m1 x 1=k 2 ( x 2x 1 ) +c 2 ( x 2 x 1 ) c 1 x 1k 1 x 1

m2 x 2=c 2 ( x 2 x 1 )k 2 ( x 2x 1)

5 | Page
Or we can write in the form

[ 0 m2 x 2][ ] [
c 2 c 2 x 2
+
k 2][ ] [
m1 0 x 1 c1 +c 2 c 2 x 1 k 1+ k 2 k 2 x 1
+
k2 x2
=0
0 ][ ] [ ]
Or

[ m1 0 x 1
][ ] [
c
+ 11
c 12 x 1 k
+ 11
][ ] [
k 12 x 1
0 m2 x 2 c 21 c 22 x 2 k 21 k 22 x 2
=0
0 ][ ] [ ]
[ ][ ] [ ][ ] [
10 0 x 1 + 10 5 x 1 + 4 2 x 1 = 0
0 10 x 2 5 5 x 2 2 2 x 2 0 ][ ] [ ]

In the state space representation:

Let
z 1=x 1 ; z 2=x 1 ; z 3=x 2 ; z 4= x 2

z 1=x 1=z 2

1
m1 [ 2 2 1 2 4 3
z 2=x 1= k ( z z ) +c ( z z ) c 1 z 3k 1 z 1 ]

z 3=x 2=z 4

1
m2 [ 2 3 1 2 4 2 ]
z 4= k ( z z ) +c ( z z )

[][ ][ ]
0 1 0 0
z1 k 11 c 11 k 22 c 22 z1
z 2 m1 m1 m1 m1 z2
=
z3 0 0 0 1 z3
z 4 k 22 c 22 k 22 c 22 z4
m2 m2 m2 m2

6 | Page
This equation is similar with equation (c) in the problem statement. To solve the
above equation we introduce identity matrices;

[ A ] t =[ B ] t

[ ][ ]
0 1 0 0

[ ][ ]
1 0 0 0 z 1 k 11 c11 k 22 c22 z1
0 1 0 0 z 2 m1 m1 m1 m1 z2
=
0 0 1 0 z 3 0 0 0 1 z3
0 0 0 1 z 4 k 22 c22 k 22 c 22 z4
m2 m2 m2 m2

Hence, Matrices A and B are;

[ ][ ]
0 1 0 0 0 1 0 0

[ ]
1 0 0 0 k 11 c 11 k 22 c 22 2 1 1 1
m1 m1 m1 m1
[ A ]= 0 1 0 0 , [ B ]= = 5 1 5 2
0 0 1 0 0 0 0 1 0 0 0 1
0 0 0 1 k 22 c 22 k 22 c 22 1 1 1 1
m2 m2 m2 m2 5 2 5 2

4.0 MATLAB PROGRAMMING

a. Determination of eigenvalues and eigenvectors

clc;clear
clear all;
disp('Enter the combination of m, c and k')

m1 = input('input value for m1, default 10, ... ');


if (isempty(m1))
m1 = 10;
else

7 | Page
end

m2 = input('input value for m2, default 10, ... ');


if (isempty(m2))
m2 = 10;
else
end

k11 = input('input value for k11, default 4, ... ');


if (isempty(k11))
k11 = 4;
else
end

k12 = input('input value for k12, default -2, ... ');


if (isempty(k12))
k12 = -2;
else
end

k21 = input('input value for k21, default -2, ... ');


if (isempty(k21))
k21 = -2;
else
end

k22 = input('input value for k22, default 2, ... ');


if (isempty(k22))
k22 = 2;
else
end

c11 = input('input value for c11, default 10, ... ');


if (isempty(c11))
c11 = 10;
else
end

c12 = input('input value for c12, default -5, ... ');


if (isempty(c12))
c12 = -5;
else
end

c21 = input('input value for c21, default -5, ... ');


if (isempty(c21))
c21 = -5;
else
end

c22 = input('input value for c22, default 5, ... ');


if (isempty(c22))
c22 = 5;
else

8 | Page
end

% define the system matrix, aphys, in physical coordinates


aphys = [ 0 0 1 0
0 0 0 1
-k11/m1 -k12/m1 -c11/m1 -c12/m1
-k21/m2 -k22/m2 -c21/m2 -c22/m2];
% solve for the eigenvalues of the system matrix
[xm,lambda] = eig(aphys)

% take the diagonal elements of the generalized eigenvalue matrix lambda


disp('The eigenvalues,lambda are')
eigen = diag(lambda)

% keeping track of how the eigenvalues are ordered in reorder the


% eigenvectors to match, using indexhz
[lambdaorder,indexhz] = sort(abs(imag(eigen)));
for cnt = 1:length(eigen)
lambdao(cnt,1) = eigen(indexhz(cnt)); % reorder eigenvalues
xmo(:,cnt) = xm(:,indexhz(cnt)); % reorder eigenvector columns
end
% now normalize the eigenvectors with respect to the position of mass 1,
which
% will be set to 1.0
for cnt = 1:length(eigen)
xm1(:,cnt) = xmo(:,cnt)/xmo(1,cnt)
end
disp('The eigenvectors Xs are')
eivec=xm1

b. Results from MATLAB

Enter the combination of m, c and k


input value for m1, default 10, ...
input value for m2, default 10, ...
input value for k11, default 4, ...
input value for k12, default -2, ...
input value for k21, default -2, ...
input value for k22, default 2, ...
input value for c11, default 10, ...
input value for c12, default -5, ...
input value for c21, default -5, ...
input value for c22, default 5, ...

xm =

0.6892 0.6892 -0.5067 - 0.0000i -0.5067 + 0.0000i


-0.4259 + 0.0000i -0.4259 - 0.0000i -0.8199 -0.8199
-0.4511 + 0.2127i -0.4511 - 0.2127i 0.0484 - 0.1314i 0.0484 + 0.1314i

9 | Page
0.2788 - 0.1314i 0.2788 + 0.1314i 0.0783 - 0.2127i 0.0783 + 0.2127i

lambda =

-0.6545 + 0.3086i 0 0 0
0 -0.6545 - 0.3086i 0 0
0 0 -0.0955 + 0.2594i 0
0 0 0 -0.0955 - 0.2594i

The eigenvalues,lambda are

eigen =

-0.6545 + 0.3086i
-0.6545 - 0.3086i
-0.0955 + 0.2594i
-0.0955 - 0.2594i

xm1 =

1.0000
1.6180 - 0.0000i
-0.0955 + 0.2594i
-0.1545 + 0.4197i

xm1 =

1.0000 1.0000
1.6180 - 0.0000i 1.6180 + 0.0000i
-0.0955 + 0.2594i -0.0955 - 0.2594i
-0.1545 + 0.4197i -0.1545 - 0.4197i

xm1 =

1.0000 1.0000 1.0000


1.6180 - 0.0000i 1.6180 + 0.0000i -0.6180 + 0.0000i
-0.0955 + 0.2594i -0.0955 - 0.2594i -0.6545 + 0.3086i
-0.1545 + 0.4197i -0.1545 - 0.4197i 0.4045 - 0.1907i

xm1 =

1.0000 1.0000 1.0000 1.0000


1.6180 - 0.0000i 1.6180 + 0.0000i -0.6180 + 0.0000i -0.6180 - 0.0000i
-0.0955 + 0.2594i -0.0955 - 0.2594i -0.6545 + 0.3086i -0.6545 - 0.3086i
-0.1545 + 0.4197i -0.1545 - 0.4197i 0.4045 - 0.1907i 0.4045 + 0.1907i

10 | P a g e
The eigenvectors Xs are

eivec =

1.0000 1.0000 1.0000 1.0000


1.6180 - 0.0000i 1.6180 + 0.0000i -0.6180 + 0.0000i -0.6180 -
0.0000i
-0.0955 + 0.2594i -0.0955 - 0.2594i -0.6545 + 0.3086i -0.6545 -
0.3086i
-0.1545 + 0.4197i -0.1545 - 0.4197i 0.4045 - 0.1907i 0.4045 +
0.1907i

11 | P a g e
5.0 FURTHER INVESTIGATION OF MASS-SPRING-DAMPER SYSTEM

We can investigate the system with various combinations of m, c, and k with


proper MATLAB coding, but we need to have an initial value condition to
make the system vibrating. Hence we can study the effect of various
combinations of m, c, and k.

We introduce a function to keep all the variables of the system, and another
one function to investigate the graphical results of system with a several
different input of variable m, c and k.

Variable Function

function z = msdivc(t,x)
global m1 m2 c11 c12 c21 c22 k11 k12 k21 k22
A=[0, 0, 1, 0; 0, 0, 0, 1; -k11/m1, -k12/m1, -c11/m1, -c12/m1; -k21/m2,
-k22/m2,-c21/m2, -c22/m2];
z=A*x

Calculation Program

clc;clear;
global m1 m2 c11 c12 c21 c22 k11 k12 k21 k22
m1=10; m2=10; c11=40; c12=-20; c21=-20; c22=20; k11=4; k12=-2; k21=-2;
k22=2;
[t,x]=ode23('msdivc',[0,50],[0 0 0 0])
plot(t,x),xlabel('time(s)')
legend('displacement 1','velocity 1','displacement 2','velocity 2')

Comments on calculation program


We use the original given values of m, c and k in the program to show how
the system behaves as we give several different initial values of
displacement and velocity. In this program, we also set 50 second of time for
system to show how it response to the given initial values;

12 | P a g e
13 | P a g e
a) Case 1
Initial value of displacement set to 1mm for mass 1, we have
As we can see from figure 1, the response of the system last only up to

1.2
displacement 1
velocity 1
1
displacement 2
velocity 2
0.8

0.6

0.4

0.2

-0.2
0 5 10 15 20 25 30 35 40 45 50
time(s)
Figure 2: Initial displacement 1=1mm

25 seconds, but for mass 1; the response last until 50s. The system is
giving less response for initial displacement set to mass 1. To further
see the behavior of the system we include initial velocity at mass 1,
which is 1mm/s. The figure 3 below shows how the system response to
the given initial conditions.

14 | P a g e
1.4
displacement 1
1.2 velocity 1
displacement 2
velocity 2
1

0.8

0.6

0.4

0.2

-0.2
0 5 10 15 20 25 30 35 40 45 50
time(s)

Figure 3: mass 1; displacement=1mm, velocity=1mm/s

Now we can notice the response of the system, which more obvious
from figure 2. Giving more initial values of displacement or velocity will
lead the system to vibrating at certain period of time. But high values
of displacement or velocity can lead to system failure since the system
would vibrate at its natural frequencies.

15 | P a g e

You might also like