Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5...

44
Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics of rigid and deformable bodies - is dedicated to the study of oscillatory motions of bodies and forces associated with them. All physical bodies, and structures made of them, posses the mass and stiffness and are thus capable of vibration. In certain engineering cases vibration plays a paramount role, in others it is negligible and is of no interest from a technical point of view. To decide which type is the problem under consideration is a matter of vibration analysis and fine engineering judgement. In this chapter different ways are presented for ascertaining the character of vibrations in terms of natural frequencies and modes of vibration. A number of examples of simplified cases of real world structures are treated by basic approaches of classical mechanics, numerical mathematics and Matlab programming. The most difficult step in vibration analysis is the process of modelling - it consists of the creation of a mathematical model of the system or structure to be considered. The mathematical models fall into ‘two basic categories, i.e. continu- ous or discrete parameter models. An example of a continuous model is a thin beam treated according to Bernoulli-Euler hypothesis, an example of a discrete model is a lattice - a structure composed of mass particles and massless springs. A contin- uous model leads to partial differential equations while a discrete one to ordinary differential equations. In order to understand the behaviour of real systems a series of simplified cases will be shown and treated in this chapter. Often parts of systems can be treated rigid and the number of degrees of freedom can thus be reduced. Although all vibrating systems are subject to damping - since energy is always dissipated - it is often advantageous to treat systems without damping since in case of small damping the system behaviour is influenced only slightly. 301

Transcript of Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5...

Page 1: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

Chapter 5

Vibrations

5.1 Introduction to vibration

The subject of vibration - a subset of dynamics of rigid and deformable bodies - isdedicated to the study of oscillatory motions of bodies and forces associated withthem.

All physical bodies, and structures made of them, posses the mass and stiffnessand are thus capable of vibration. In certain engineering cases vibration plays aparamount role, in others it is negligible and is of no interest from a technical pointof view. To decide which type is the problem under consideration is a matter ofvibration analysis and fine engineering judgement.

In this chapter different ways are presented for ascertaining the character ofvibrations in terms of natural frequencies and modes of vibration. A number ofexamples of simplified cases of real world structures are treated by basic approachesof classical mechanics, numerical mathematics and Matlab programming.

The most difficult step in vibration analysis is the process of modelling - itconsists of the creation of a mathematical model of the system or structure to beconsidered. The mathematical models fall into ‘two basic categories, i.e. continu-ous or discrete parameter models. An example of a continuous model is a thin beamtreated according to Bernoulli-Euler hypothesis, an example of a discrete model isa lattice - a structure composed of mass particles and massless springs. A contin-uous model leads to partial differential equations while a discrete one to ordinarydifferential equations.

In order to understand the behaviour of real systems a series of simplified caseswill be shown and treated in this chapter. Often parts of systems can be treated rigidand the number of degrees of freedom can thus be reduced. Although all vibratingsystems are subject to damping - since energy is always dissipated - it is oftenadvantageous to treat systems without damping since in case of small damping thesystem behaviour is influenced only slightly.

301

Page 2: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 302

We distinguish two general classes of vibration, namely free and forced.Free vibration occurs when the system vibrates under action of internal forces

only; mathematically the free vibration is fully described by a so-called homoge-neous integral of the corresponding equation of motion and numerically leads to thesolution of the generalized eigenproblem that produces eigenvalues and eigenvec-tors.

Eigenvalues (mathematical entities) directly correspond to eigenfrequencies orto natural frequencies (mechanical entities) while eigenvectors are natural modes ofvibrations. It can be shown that a discrete system with n degrees of freedom hasn pairs of eigenfrequencies and eigenmodes. Continuous systems have unboundedspectrum - the number of their natural frequencies and modes of vibrations is infi-nite. Free vibration of a linear system can always be expressed as a superpositionof all eigenmodes whose amplitudes depend on initial conditions.

Forced vibration takes place under the excitation of external forces. When theexcitation is oscillatory we talk about steady-state vibration, in other cases we talkabout transient vibration.

Assembling the equations of motion is an important step in the process of deter-mination the vibration behaviour of the system. There are several methods for do-ing that, namely - the free body diagram, the principle of virtual work, Lagrangianmethod (equations) and Hamiltonian principle, etc. To find more about these meth-ods see chapter the Dynamics.

In this chapter we will concentrate on methods leading to the determinationof oscillatory motion by analytical and numerical methods. We will devote ourattention to linear systems and to simple 1D cases believing that the understandingthe procedures described here will allow the reader to use them effectively in morecomplicated cases as well. A list of books and papers pertinent for the subject is inthe bibliography.

Matlab programs, accompanying the text, are used not only for the computa-tion itself but also for reading. They are not written in the most possible efficientway, the emphasis is given to the explanation of both mechanics and programmingprinciples.

The reader of the text is assumed to be familiar with basics of mechanics ofsolids, matrix algebra manipulations, standard calculus analysis and with rudimentsof Matlab programming skills.

5.2 Harmonic and periodic motions

One-dimensional harmonic motion of a particle can be described by a sine (or co-sine) function of time in the form

u(t) = u0 sin (!t+ ') (5.1)

Page 3: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 303

where

u(t) is the displacement measured in [m],u0 is amplitude of motion [m],! is angular frequency [rad/s],t is time [s],' is an initial phase, phase constant or epoch [rad].

The angular frequency! is related to the cyclic frequencyf by

! = 2�f (5.2)

wheref has the dimension [1/s].When the harmonic motion is related to the rotary motion we can considerf as

revolutions per second and define

n = 60f [1=min] (5.3)

as R.P.M. or revolutions per minute.If we addT to t, then the value ofu(t) must remain unaltered. This requires that

the argument of the sine has been increased by2�. From it follows that!T = 2�.The quantityT is called period and is

T =2�

![s]: (5.4)

The velocity and acceleration of a harmonic motion are given by derivatives ofdisplacement with respect to time

_u(t) = u0 ! cos (!t+ ') and �u(t) = �u0 !2 sin (!t+ ') (5.5)

whereu0 ! andu0 !2 are amplitudes of velocity and acceleration respectively.The motion is harmonic if it is described by a sine or cosine function in time.The motion is periodic if it has the same pattern after a periodT or after its

integer multiples. For the function describing it we can writeu(t) = u(t+ kT ), fork = 0;�1;�2;�3; : : :

Combination (superposition) of two harmonic motions being expressed by

u1 = u10 sin (!1t+ '1) and u2 = u20 sin (!2t+ '2) (5.6)

gives a simple harmonic (sinusoidal) wave if and only if their angular frequenciesare the same, i.e.!1 = !2. In such a case

u = u1 + u2 = u0 sin (!t+ '0) (5.7)

Page 4: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 304

where

u0 =�u210 + u220 + 2 u10u20 cos('2 � '1)

� 12 ; ! = !1 = !2; (5.8)

'0 = arctanu10 sin'1 + u20 sin'2

u10 cos'1 + u20 cos'2: (5.9)

The sum of two harmonic motions with different angular frequencies is not har-monic, i.e.u = u1 + u2 6= u0 sin (!t+ '0). It could, however, be periodic if theratio of frequencies is a rational number.

A special case of interest is when the frequencies are slightly different. Let usconsider the motion in the form

u = u1 + u2 = u10 sin(!t) + u10 sin [(! + ")t] : (5.10)

Simple trigonometric manipulation reveals that

u = U sint = 2 u10 cos�"2t�sinh�! +

"

2

�ti: (5.11)

The resulting motion could be considered as a sine wave with angular frequency = ! + "=2 and with varying amplitudeU = 2 u10 cos (" t=2). Every time theamplitude reaches a maximum, there is said to be a beat. Beats are well pronouncedif the difference of frequencies is small, i.e. if"� !.

Read carefully the following Matlab programVHMharpoh1a.m . Observe theresults shown in Fig. 5.1, Fig. 5.2 and Fig. 5.3. Observe what happens as the inputparameters are varied.

% VHMharpoh1a% addition of harmonic motionsclearu10=10; u20=20; % amplitudesom1=0.3; om2=1.05; % frequenciesfi1=0.1; fi2=0.4; % phase anglest=0:pi/64:12*pi; % time rangeu1=u10*sin(om1*t+fi1); % the first motionu2=u20*sin(om2*t+fi2); % the second motionuv=u1+u2; % add

figure(1)subplot(3,1,1); plot(t,u1,’k’); axis(’off’)subplot(3,1,2); plot(t,u2,’k’); axis(’off’)subplot(3,1,3); plot(t,uv,’k’);title(’sum of two periodic motions’,’fontsize’,13);xlabel(’does not generally give a periodic motion’,’fontsize’,13);print VHMharpohf1.eps -deps

Page 5: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 305

0 5 10 15 20 25 30 35 40−40

−20

0

20

40sum of two periodic motions

does not generally give a periodic motion

Figure 5.1: Harmonic and periodic motions

% a case with different amplitudes and frequenciesom1=2; om2=4;u1=u10*sin(om1*t+fi1);u2=u20*sin(om2*t+fi2);uv=u1+u2;

figure(2)subplot(3,1,1); plot(t,u1,’k’); axis(’off’);subplot(3,1,2); plot(t,u2,’k’); axis(’off’);subplot(3,1,3); plot(t,uv,’k’)title(’if the frequency ratio is an integer’,’fontsize’,13);xlabel(’then the resulting motion is periodic’,’fontsize’,13)print VHMharpohf2.eps -deps

Two wave motions with ’close’ frequencies lead to the well-known phenomenonof beat frequencies.

% a case with the same amplitudesom1=4.1; om2=4.8;u1=u10*sin(om1*t+fi1);

Page 6: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 306

0 5 10 15 20 25 30 35 40−40

−20

0

20

40if the frequency ratio is an integer

then the resulting motion is periodic

Figure 5.2: Periodic motions

u2=u10*sin(om2*t+fi2);uv=u1+u2;

figure(3)subplot(3,1,1); plot(t,u1,’k’); axis(’off’)subplot(3,1,2); plot(t,u2,’k’); axis(’off’)subplot(3,1,3); plot(t,uv,’k’)title(’superposition of close frequencies - beats’,’fontsize’,13)print VHMharpohf3.eps -deps% end of VHMharpoh1a

If a particle performs harmonic motions in two mutually perpendicular direc-tions, say

u = u0 sin (!1t) w = w0 sin (!2t+ ') (5.12)

then as a resulting motion we get interesting patterns, known as Lissajouse figures.Their appearance depends on the ratio of frequencies and the phase difference. Sim-ple trigonometrical manipulation shows that for the same frequencies we obtain atilted ellipse, which in some cases could degenerate into a circle or a straight line.

Page 7: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 307

0 5 10 15 20 25 30 35 40−20

−10

0

10

20superposition of close frequencies − beats

Figure 5.3: Beats

See programVHMlissa1.m showing how (see Fig. 5.4) this effect could beemployed for the phase identification.

% VHMlissa1% Lissajouse patterns - the influence of a phase shiftcleart=0:0.001:8;om1=2; om2=2;u0=1; w0=1;fi=pi/2; i=0;figure(1)for fi=0:pi/34:pi

u=u0*sin(om1*t); w=w0*sin(om2*t+fi);i=i+1;subplot(6,6,i); lab=[’fi = ’ num2str(fi)];plot(u,w,’k’); axis(’square’); axis(’off’)

endtext(-11,-2,’Lissajouse with a phase shift’,’fontsize’,13)print VHMlissa1.eps -deps% end of VHMlissa1

Page 8: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 308

Lissajouse with a phase shift

Figure 5.4: Lissajouse pattern – the influence of a shift

Page 9: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 309

If the ratio of frequencies is not a rational number we obtain curves that aregenerally not closed. An example of such a curve is generated by the programVHMlissa2.m – see Fig. 5.5.

% VHMlissa2% Lissajouse pattern - just for funcleart=0:0.001:1;om1=102; om2=203;u0=1; w0=1; fi=0;figure(1)u=u0*sin(om1*t); w=w0*sin(om2*t+fi);plot(u,w,’k’); axis(’off’)print VHMlissa2.eps -deps% end of VHMlissa2

Figure 5.5: Lissajouse pattern – just for fun

Page 10: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 310

5.3 Phase and group velocities

Let us consider vibrations (a wave displacement) described by a superposition oftwo harmonic waves in time and space, having the equal amplitude

y = A [cos ( 1x� !1t) + cos ( 2x� !2t)] (5.13)

propagating inx direction of 1D space whereA is the amplitude, i = 2�=�i arewave numbers,�i are wave lengths,!i = 2�=Ti are frequencies andTi are periods.In all casesi = 1; 2.

By the use of simple trigonometric relations Eq. (5.13) could be presented as aso called modulated wave in the form

y = y0 cos

� 1 + 2

2x�

!1 + !2

2t

�(5.14)

where the variable amplitude

y0 = 2A cos

� 1 � 2

2x�

!1 � !2

2t

�(5.15)

is called the modulation. The remaining factor of Eq. (5.14) is called the carrierwave. The Eq. (5.14) describes a wave similar to original waves averaging theirwave numbers and angular frequencies. The amplitudey0, being a cosine func-tion as well, changes usually more slowly with respect to time and space variables,however.

Due to generic definitions of frequencies and wave numbers given above we canwrite 2� = T! and2� = � . In this case the ratio

!

=

T= cp (5.16)

is a constant called the phase velocity. It describes the speed of propagation of adisplacement having the same phase. In transient processes we could also say thatit describes the propagation of a wave front. In our case the resulting phase velocityof the vibration given by Eq. (5.14) is given by

cp =!1 + !2

1 + 2: (5.17)

The velocity of propagation of the modulation or the ’envelope’, defined by Eq.(5.15), is called the group velocity and is given by

cg =!1 � !2

1 � 2: (5.18)

Page 11: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 311

The group velocity carries information concerning a group of waves - a wave packet- as a whole.

If the phase velocity of the wave motion under consideration is not constant -i.e. it is a function of the wavenumber, or frequency - we say that the motion is of adispersive nature (see paragraph 5.12.1). Then the dispersive relation has a genericform

! = ! ( ) (5.19)

and the phase and group velocities are given by

cp =! ( )

; (5.20)

cg =d!

d : (5.21)

For more details see [8].Propagation of a wave, defined by Eq. (5.14), is modelled by the program

VPGgroup.m that for ad hoc input data computes the phase and group velocities andgenerates space-time displacement distributions along the chosen time and spaceintervals. At first, a time sequence of space distributions of the modulated wave Eq.(5.14), and of the modulation Eq. (5.15), are presented as functions of the spatialcoordinatex - a sort of time snapshots of each considered space interval - then a se-quence of the history of modulated wave for each considered space point is shown.The last figure from each sequence is stored as a picture file and presented here asFig. 5.6 and Fig. 5.7 respectively.

ProgramVPGgroup.m is as follows

% VPGgroup% explanation of group velocityclear; format compact; format short% angular frequencies ... 2pi/Tom1 = 11; om2 = 10;% wave numbers ... 2pi/lambdaga1 = 3; ga2 = 2;

% phase and group velocitiescg = (om1-om2)/(ga1-ga2);cp = (om1+om2)/(ga1+ga2);disp(’phase and group velocities are’)[cp cg]

% range of coordinatesxmin = 0; dx = 0.05; xmax = 35; % in spacetmin = 0; dt = 0.01; tmax = 2; % in timetrange = tmin:dt:tmax; lt = length(trange);xrange = xmin:dx:xmax; lx = length(xrange);

Page 12: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 312

% dimensioning variablesz1 = zeros(lt,lx); z2 = z1; z3 = z1;a = 1;for i = 1:lt % time loop

t=tmin+(i-1)*dt;for j = 1:lx % distance loop

x=xmin + (j-1)*dx;arg1 = (ga1 - ga2)*x/2 - (om1 - om2)*t/2;arg2 = (ga1 + ga2)*x/2 - (om1 + om2)*t/2;y0 = 2*a*cos(arg1); % frequency modulationy = cos(arg2); z1(i,j) = y0; z2(i,j) = y;z3(i,j) = y0*y; % displacement

endend

% displacement distribution along x as a function of timefigure(1)for i = 1:lt

t=tmin+(i-1)*dt; strt = num2str(t);tit = [’t = ’ strt];plot(xrange,z3(i,:), xrange,z1(i,:),’r’, ’linewidth’,2);title(tit); xlabel(’x-range’);ylabel(’displacement and its modulation’);pause(0.2); clf; hold on

end% plot the last one once moreplot(xrange,z3(lt,:), xrange,z1(lt,:),’r’, ...

xrange,-z1(lt,:),’r’,’linewidth’,2); gridtitle(tit);xlabel(’x-range’);ylabel(’displacement and its modulation’);hold offprint -dmeta VPGgroup_1; print -deps VPGgroup_1

% history of displacements for each considered xfigure(2)for j = 1:lx

x=xmin + (j-1)*dx; strx = num2str(x);tit = [’x = ’ strx];plot(trange,z3(:,j), ’linewidth’,2);title(tit); xlabel(’t-range’);ylabel(’displacement and its modulation’);pause(0.2); clf; hold on

end% plot the last one once moreplot(trange,z3(:,lx), ’linewidth’,2); grid;title(tit); xlabel(’t-range’);ylabel(’history of displacement’);

Page 13: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 313

hold off

print -dmeta VPGgroup_2; print -deps VPGgroup_2% end of VPGgroup

0 5 10 15 20 25 30 35−2

−1.5

−1

−0.5

0

0.5

1

1.5

2t = 2

x−range

disp

lace

men

t and

its

mod

ulat

ion

Figure 5.6: Space distribution of modulated wave (blue) and its modulation (red)for a given time

This figure is the last one from the time sequence that can be observed on thescreen when running the program VPGgroup.m. Watching closely the motion of thefirst peaks of the modulated and modulation waves one can notice that the distancesreached during the time intervalh0; 2i are 8.4 and 2 respectively and correspondto phase and group velocities 4.2 and 1 units of distance per a unit of time. Thesevalues were computed and ’printed’ by the program according to Eq. (5.17) and(5.18).

As previously mentioned the Fig. 5.6 is a sort of time snapshot, while Fig. 5.7shows a signal that would have been measured at a given space point by a sensorable to register the displacement as a function of time.

Page 14: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 314

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2−1.5

−1

−0.5

0

0.5

1

1.5x = 35

t−range

hist

ory

of d

ispl

acem

ent

Figure 5.7: Time distribution of the modulated wave for a given space point

Page 15: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 315

5.4 Fourier series

A periodic function satisfying Dirichlet’s conditions1 can be expressed as a sum ofa countable set of harmonic functions in the form

u(t) =a02

+1Xk=1

(ak cos(k!t) + bk sin(k!t)) (5.22)

where

a0 =2

T

Z T

0

u(t) dt; (5.23)

ak =2

T

Z T

0

u(t) cos(k!t) dt; for k = 1; 2; : : : ; (5.24)

bk =2

T

Z T

0

u(t) sin(k!t) dt; for k = 1; 2; : : : ; (5.25)

T =2�

!: (5.26)

The formulas above describe a Fourier series. As an example the Fourier series fora periodic function, which – in one period – is defined by

u(t) =

(h for 0 � t � T

2

0 for T2� t � T

(5.27)

is to be calculated. The coefficientsak of Fourier series are as follows

a0 =2

T

Z T

0

u(t) dt =2

T

Z T

2

0

h dt =2

T

hhti T2

0=

2

ThT

2= h; (5.28)

ak =2

T

Z T

0

u(t) cos(k!t) dt =2

T

Z T

2

0

h cos(k!t) dt =

=2h

T[sin(k!t)]

T

2

0

1

k!=

2h

T

1

k!

�sin

�k!

T

2

�� sin(0)

�=

2h

T

1

k!sin

�k2�

T

T

2

�=

2h

T

1

k!sin(k�); (5.29)

since! = 2�=T .Realizing thatsin(k�) = 0 for k = 1; 2; 3; : : : we can conclude that allak = 0.

1The function must be piece-wise regular, i.e. it must have only a finite number of finite discon-tinuities and only a finite number of extreme values.

Page 16: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 316

For coefficientsbk we can write

bk =2

T

Z T

0

u(t) sin(k!t) dt =2

T

Z T

2

0

h sin(k!t) dt =2h

T

�� cos(k!t)

k!

�T2

0

=

=2h

T

�cos(k!t)

k!

�0T

2

=2h

Tk!

�cos(0)� cos

�k!

T

2

��=

=2h

Tk 2�T

�1� cos

�k2�

T

T

2

��=

h

k�[1� cos(k�)] : (5.30)

Sincecos(k�) = �1 for k being odd andcos(k�) = +1 for k being an even number,we can conclude that

bk = 0 for k being even andbk = 2h=k� for k being odd.

The final result is

u(t) =a02

+X

k=1:2:kmax

bk sin(k!t) =h

2+

Xk=1:2:kmax

2h

k�sin

�k2�

Tt

�: (5.31)

Note: The Matlab statementk=1:2:kmax should be understood ask =1; 3; 5; : : : kmax.

See the programVF1deffuna_lan.m where the last formula is evaluated, allthe terms are summed and the result plotted. Odd coefficientsb(k), countedi =(k + 1)=2 = 1; 2; 3; : : : , forming a so called discrete line spectrum, are plotted aswell.

% VF1deffuna_lan% Fourier series of a periodic function, Lanczos correction addedclearT = 5; % periodh = 1; % amplitudei = 0; % counterkmax = 10; % number of terms% kmax = 50;tt = 0:0.005:10; % time rangefor t=tt

sum = 0; i = i+1; sum_la = 0;for k = 1:2:kmax

sum = sum + 2*sin(2*k*t*pi/T)/(k*pi); % Fourier seriesm = kmax + 1;sig = sin(pi*k/m)/(pi*k/m);sum_la = sum_la + sig*2*sin(2*k*t*pi/T)/(k*pi); % Lanczos

end

Page 17: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 317

u(i) = 0.5*h + sum; u_la(i) = 0.5 + sum_la;endfigure(1); subplot(2,1,1)l1 = ...’Fourier series (green) and Lanczos correction (red) for kmax = ’;lab=[l1 int2str(kmax)];plot(tt,u’,’g’, tt,u_la,’r’); title(lab,’fontsize’,13);% plot b(k) coefficients - line spectrumi=0;for k=1:2:kmax

i=i+1;b(i)=2/(k*pi);

endsubplot(2,1,2); bar(b);title(’odd coefficients b(k) - line spectrum’,’fontsize’,13);xlabel(’i=(k+1)/2’,’fontsize’,13);print VF1deff10.eps -deps% print VF1deff50.eps -deps%end of VF1deffuna_lan

The graphical output forkmax = 10 and kmax = 50 is in Fig. 5.8 and 5.9respectively.

The convergence to the ’correct’ result is obvious but not too fast. In the vicinityof the discontinuity the Fourier series gives a value, which is just an average ofvalues from the left and from the right. A certain ’overshot’ near the discontinuity issometimes called a Gibbs phenomenon. This effect does not vanishwith increasingnumber of terms.

An interesting approach leading to the ’elimination’ of the Gibbs phenomenonwas proposed by Lanczos [16] who derived a corrective term that takes into accountthe finite number of terms added when evaluating Eq. (5.31) numerically. If thenumber of terms being added iskmax (i.e. the higher terms are neglected) then thek-th corrective factor is

�k =sin�

�kkmax+1

��k

kmax+1

(5.32)

and Eq. (5.31) (for a rectangular pulse) changes to

u(t) =h

2+

Xk=1:2:kmax

�k2h

k�sin

�k2�

Tt

�: (5.33)

Observe the results in Fig. 5.8 and 5.9.A similar example. Find a Fourier series for a periodic functionf(x) = x,

defined on the intervalh��; �i. The period of this function is2�. Alternatively wecan write

f(x) = a0 +1Xk=1

(ak cos(kx) + bk sin(kx)) (5.34)

Page 18: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 318

0 1 2 3 4 5 6 7 8 9 10−0.2

0

0.2

0.4

0.6

0.8

1

1.2Fourier series (green) and Lanczos correction (red) for kmax = 10

1 2 3 4 50

0.1

0.2

0.3

0.4

0.5

0.6

0.7odd coefficients b(k) − line spectrum

i=(k+1)/2

Figure 5.8: Fourier series – small number of terms

where

a0 =1

2�

Z �

��

f(x) dx; (5.35)

ak =1

Z �

��

f(x) cos(x) dx; bk =1

Z �

��

f(x) sin(x) dx: (5.36)

Evaluatingak we find that all of them are equal to zero sincef(x) is an odd functionof coordinates, while forbk we get

bk =1

Z �

��

x sin(x) dx =

(2k if k is odd;

�2k if k is even:(5.37)

So finally we have

f(x) = 2

�sin(x)

1�

sin(2x)

2+

sin(3x)

3: : :

�: (5.38)

Page 19: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 319

0 1 2 3 4 5 6 7 8 9 10−0.2

0

0.2

0.4

0.6

0.8

1

1.2Fourier series (green) and Lanczos correction (red) for kmax = 50

0 5 10 15 20 25 300

0.1

0.2

0.3

0.4

0.5

0.6

0.7odd coefficients b(k) − line spectrum

i=(k+1)/2

Figure 5.9: Fourier series – larger number of terms

The programVF1fourtri.m shows the results for varying numbers of terms in theseries

% VF1fourtri.m% find Fourier series representation for f(x)=x in <0,2*pi>clearkmaxx=[1 3 5 8]; % number of terms to be addeddx = 0.01; x = 0:dx:2*pi;x1 = 0:dx:pi; x2 = pi+dx:dx:2*pi;y2 = x2-2*pi; y3 = [x1 y2];sizex = size(x); xcount = sizex(2);%i = 0;for kmax=kmaxx

for ix = 1:xcountf = 0;for k = 1:kmax

f = f+2*(-1)^(k+1)*sin(k*x(ix))/k;end

Page 20: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 320

fx(ix) = f;endi = i + 1; subplot(2,2,i); plot(x,fx,’r’,x,y3,’g’),axis([0,6.3, -3.5 3.5]); gridkmaxs=num2str(kmax); kmaxss=’kmax = ’;title([kmaxss kmaxs],’fontsize’,13)

endprint -deps VF1fourtri.eps%end of VF1fourtri

The graphical output ofVF1fourtri.m is shown in Fig. 5.10.

0 2 4 6

−3

−2

−1

0

1

2

3

kmax = 1

0 2 4 6

−3

−2

−1

0

1

2

3

kmax = 3

0 2 4 6

−3

−2

−1

0

1

2

3

kmax = 5

0 2 4 6

−3

−2

−1

0

1

2

3

kmax = 8

Figure 5.10: Fourier series for a ’saw’ function

Page 21: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 321

5.5 Fourier integral

Increasing the period of a periodic function to infinity, we obtain a nonperiodicfunction which can be expressed as a superposition of noncountable set of harmoniccomponents in the form

u(t) =

Z1

0

C(!) cos(!t) d! +

Z1

0

D(!) sin(!t) d! (5.39)

where the so called spectral functionsC(!) andD(!), being counterparts of Fouriercoefficients, can be expressed by

C(!) =1

Z1

�1

u(t) cos(!t) dt;

D(!) =1

Z1

�1

u(t) sin(!t) dt:

(5.40)

The quantityG(!) =

pC2(!) +D2(!) (5.41)

is called the amplitude or power spectrum. The function appearing in the Fourierintegral and its first derivative must be piece-wise continuous, differentiable andabsolutely integrable, i.e.

R +1

�1ju(t)j dt <1.

As an example let’s calculate the Fourier integral foru(t) being a rectangularpulse with amplitudeh and the time lengthT . In this case we can write

C(!) =1

Z1

�1

u(t) cos(!t) dt =1

Z T

0

h cos(!t) dt =h

�!sin(!T );

D(!) =1

Z1

�1

u(t) sin(!t) dt =1

Z T

0

h sin(!t) dt =h

�![1� cos(!T )] :

(5.42)Reconstructing the initial functionu(t) by means of the Fourier integral numeri-

cally, we have to chose a suitable finite upper limit!max of the definition integralinstead of infinity.

~u(t) =h

Z !max

0

1

![sin(!T ) cos(!t) + (1� cos(!T )) sin(!t)] d!: (5.43)

The following programVF2testsim.m solves the problem by means of one-third Simpson quadrature with Richardson error estimation [4]. This is provided bythe functionVF2simpson.m , which repeatedly calls the functionVF2four.m whichevaluates the integrand of the previous integral. Notice that the integrand gives anindefinite expression for! ! 0. Using the l’Hôpital rule we easily get

lim!!0

~u(t) =hT

�: (5.44)

Page 22: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 322

See how it is implemented in functionVF2four.m . The time range ist 2h�4; 5i. The upper frequency limit!max (ommax) as well as the number of inte-gration pointsm is varied in order to show the influence of these variables on thefinal result. The ’length’ of pulse isT = 1 and its amplitudeh = 1.

% VF2testsim% calculate a Fourier integral for a rectangular pulse% one-third Simpson’s rule with Richardson error estimation% is used for the quadrature in frequency domainclearglobal t h T m % communication with VF2simpson.m functionm=11; % number of points - must be an even number% m = 101;t=1; % any number could be hereh=1; T=1; % amplitude and length of the pulse

% instead to infinity in frequency domain we integrate toommax=8*pi;% ommax=16*pi;tt=-4:0.01:5; % time rangettsize=size(tt); % proper array dimensionsrr=zeros(1,ttsize(2)); ep=rr;i=0; % countera=0; b=ommax; % lower and upper frequency limits% time loopfor t=tt

i=i+1;[xx, yy]=VF2simpson(’VF2four’,a,b); % VF2four.m evaluates integrandrr(i)=xx; ep(i)=yy;

end

figure(1) % plot itsubplot(2,1,1)omst=num2str(ommax);plot(tt,rr,’k’); gridlab=[’Fourier integral for a rectangular pulse, ommax = ’ omst];title(lab,’fontsize’,13)subplot(2,1,2)plot(tt, ep,’k’); gridmst=int2str(m);lab=[’Absolute error estimation for m = ’ mst];title(lab,’fontsize’,13)print VF2t11_8.eps -deps;xlabel(’the results are wrong’,’fontsize’,13)% print VF2t101_16.eps -deps;% xlabel(’the results are "correct"’,’fontsize’,13)

% end of VF2testsim

Page 23: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 323

function [y,ep]=VF2simpson(fun,a,b)global t h T m % communication with main program VF2testsim.m% one third-Simpson quadrature% for fun(x) from a to b

% ep estimated error% v1 result calculated with m points% v2 result calculated with 2*m points% v result improved with Richardson extrapolation

% integration with m stepsdelt1=(b-a)/m;s1s=0;for k=2:2:m-2

xk=a+delt1*k;yk=feval(fun,xk,t,h,T);s1s=s1s+yk;

ends1l=0;for k=1:2:m-1

xk=a+delt1*k;yk=feval(fun,xk,t,h,T);s1l=s1l+yk;

endv1=(feval(fun,a,t,h,T)+feval(fun,b,t,h,T)+2*s1s+4*s1l)*delt1/3;

% integration with 2*m steps - use what was already calculateddelt2=delt1/2;s2s=s1l+s1s;s2l=0;for k=1:m

xk=a+delt1*k-delt2;yk=feval(fun,xk,t,h,T);s2l=s2l+yk;

endv2=(feval(fun,a,t,h,T)+feval(fun,b,t,h,T)+2*s2s+4*s2l)*delt2/3;

% Richardson extrapolationv=(16*v2-v1)/15;% integration with m stepsy=v1;% absolute error estimation for integration with m stepsep=v-v1;% end of VF2simpson

function z=VF2four(x,t,h,T)% calculate integrand of Fourier integralif x==0,

z=h*T/pi;

Page 24: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 324

elsez=h*(sin(x*T)*cos(x*t)+(1-cos(x*T))*sin(x*t))/(pi*x);

end% end of VF2four

Two graphical outputs of this program are presented here. The first one (inFig. 5.11) presents the reconstructed rectangular pulse in the time domain for asufficiently large number of integration points (m = 101) and for the upper limit ofintegration in frequency domain!max equal to16�, i.e. ommax = 50.27... . Thevalue of error is acceptably small, wavefronts of the pulse are sufficiently steep.Notice the ’false’ oscillations in the vicinity of discontinuities. They are sometimescalled Gibbs effects; they are a sort of penalty we pay for the representation ofdiscontinuities by continuous functions.

−4 −3 −2 −1 0 1 2 3 4 5−0.2

0

0.2

0.4

0.6

0.8

1

1.2Fourier integral for a rectangular pulse, ommax = 50.2655

−4 −3 −2 −1 0 1 2 3 4 5−1

−0.5

0

0.5

1x 10

−3 Absolute error estimation for m = 101

Figure 5.11: Fourier integral – ’correct’

The results shown in Fig. 5.12 were calculated withm = 11 and!max = 8�(ommax=25.13... ). With these input values the results of computation are com-pletely wrong. Due to an unsufficient number of integration points we get a falseperiodic signal as an output. This effect is known as aliasing or folding. Notice

Page 25: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 325

the calculated absolute error distribution, the result of Richardson’s extrapolation,which is trying to warn us.

−4 −3 −2 −1 0 1 2 3 4 5−0.5

0

0.5

1

1.5Fourier integral for a rectangular pulse, ommax = 25.1327

−4 −3 −2 −1 0 1 2 3 4 5−2

−1.5

−1

−0.5

0

0.5Absolute error estimation for m = 11

Figure 5.12: Fourier integral – ’wrong’

Page 26: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 326

An example. Calculate analytically the Fourier amplitude spectrum for a half-sine and a rectangular pulses defined as follows

fs =

(h sin

�2�Tt�

for 0 � t � T2

0 otherwise,fr =

(h for 0 � t � T

2

0 otherwise.(5.45)

For a half-sine pulse the required integration for spectral functions could be pro-vided by Maple, as well as the evaluation of the amplitude spectrum.

> c:=int(sin(2*Pi*t/T)*cos(om*t), t=0..T/2); % integrate for C(om)> d:=int(sin(2*Pi*t/T)*sin(om*t), t=0..T/2); % integrate for D(om)> g:=sqrt(c^2+d^2); % amplitude spectrum G(om)> with(student);> % simplify by introducing a,b> g1:=powsubs(2*Pi+om*T=a, -2*Pi+om*T=b, g);> % Fortran code of the final formula> fortran(g1);

Maple gives the amplitude spectrum in the form

g1 :=

vuut �2T cos�12omT

��

ab� 2

T�

ab

!2

+ 4T 2 sin

�12omT

�2�2

a2b2: (5.46)

You have surely noticed that the identifierom corresponds to!, and that two newvariablesa and b, simplifying the formula, were introduced. The multiplicationconstant1=2� is missing since it will be added later.

Similarly the integration for the rectangular pulse

> with (student);> cr:=int(sin(om*t), t=0..T/2); % evaluate spectral integrals> dr:=int(cos(om*t), t=0..T/2);> gr:=sqrt(cr^2+dr^2); % amplitude spectrum> fortran(gr);> limit(gr,om=0); % limit of gr for t = 0

The spectrum and its limit forom= 0 are as follows

gr :=

vuut �cos�12omT

�om

+1

om

!2

+sin�12omT

�2om2

; (5.47)

limom!0

gr =T

2: (5.48)

The resulting formulas in Fortran format were copied into Matlab m-file, slightlyedited and then their evaluation, for the chosen range of frequencies, was carriedout and finally the results were plotted. The Matlab programVF2f1.m is as follows.

Page 27: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 327

% VF2f1% calculate frequency spectra for two different pulses% add a - a half-sine pulse y=sin(2*pi/T*t) for t <0, T/2>,% add b - a rectangular pulse for the same length.% The amplitudes in both cases are equal to 1cleari = 0; % counterT = 2; % time lenght of pulseorange = 0:0.1:40; % frequency rangegsize = size(orange);gs = zeros(gsize(2),1); gr = gs;for om = orange % frequency loop

i = i + 1;% a half sine pulsea = 2*pi+om*T; b=-2*pi+om*T;ts = sqrt((-2*T*cos(om*T/2)*pi/a/b-2*T*pi/a/b)^2 ...

+4*T^2*sin(om*T/2)^2*pi^2/a^2/b^2);% a rectangular pulse, the same length and amplitude as aboveif om == 0, % the treatment of singularity

tr = 0.5*T;else

tr = sqrt((-cos(om*T/2)/om+1/om)^2+sin(om*T/2)^2/om^2);end % of ifgs(i) = ts; gr(i) = tr;

end% gs = gs/(2*pi); gr = gr/(2*pi);figure(1)plot(orange,gs,’k’, orange,gr,’k:’,’linewidth’,2);tt = [’Frequency spectra for two pulses’];title(tt,’fontsize’,12);xlabel(’Angular frequency’,’fontsize’,12);ylabel(’Amplitude spectrum’,’fontsize’,12);text(5,0.12, ’Rectangular pulse ... dotted’, ’fontsize’,12)text(7,0.05, ’Half sine pulse ... solid’, ’fontsize’,12)print VF2f1 -deps% end of VF2f1

Observing Fig. 5.13 one could notice that the contribution of high-frequencycomponents for a pulse with discontinuities is substantially greater than that of acontinuous pulse. The situation is better for a pulse with continuous derivatives ofhigher order. Try to modify the previous program to calculate the spectrum for asquare sine pulse.

Page 28: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 328

0 5 10 15 20 25 30 35 400

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16Frequency spectra for two pulses

Angular frequency

Am

plitu

de s

pect

rum

Rectangular pulse ... dotted

Half sine pulse ... solid

Figure 5.13: Fourier spectra

Page 29: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 329

5.6 Discrete Fourier series

Often we do not have an explicit formula available for the evaluation of Fourier for-mulas and it is necessary to work with discrete values. Suppose we haven functionvaluesfi corresponding ton equidistantly distributed independent variablesxi fori = 0; 1; 2; : : : n� 1.

It should be reminded that the Fourier series in complex form could be alterna-tively expressed by

f(x) =1X

k=�1

ckeikx; whereck =

1

2�

Z �

��

f(x)e�ikx dx: (5.49)

Taking a finite number of terms we get a system of algebraic equations that couldbe written in the form

Ac = f (5.50)

where theA matrix has a special form for which

A�1 =1

n�A (5.51)

which substantially simplifies the solution of the system of equations needed forevaluation of unknown coefficients

c = A�1 f =1

n�Af : (5.52)

One can easily show that the elements of�A matrix are

�ajk = �wjk = w�jk; wherew = ei2�

n : (5.53)

Thus thek-th coefficient of the discrete Fourier series can be expressed in the form

ck =1

n

n�1Xj=0

fjw�jk =

1

n

n�1Xj=0

fje�ijk 2�

n : (5.54)

This formula is often called a discrete Fourier transform (DFT). An alternative form,where the real and imaginary parts are separated, is

ck =1

n

n�1Xj=0

fj cos

�2jk�

n

�� i

1

n

n�1Xj=0

fj sin

�2jk�

n

�: (5.55)

The spectrum is

gk =

q(real(ck))

2 + (imag(ck))2: (5.56)

The Matlab programVDFdiscrete.m uses this formula for the evaluation of ampli-tude spectrum for two types of discrete data pulses. See Fig. 5.13 and compare itwith Fig. 5.14 obtained analytically.

Page 30: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 330

% VDFdiscrete% discrete Fourier transformclearn = 1000; % number of discrete valueskmax = 50; % number of required spectral coefficients% dimensionsfs = zeros(1,n); fr=zeros(1,n);cs = zeros(1,kmax); ds=zeros(1,kmax);cr = zeros(1,kmax); dr=zeros(1,kmax); gr=cr; gs=cs;% define rectangular and sine pulse datafor j = 250:750

fr(j) = 1;fs(j) = sin(2*pi*(j-250)/1000);

end% calculate spectral coefficients and corresponding spectrumfor k = 1:kmax

sumcs = 0; sumds = 0; sumcr = 0; sumdr = 0;for j=1:n

sumcs = sumcs+fs(j)*cos(2*pi*(j-1)*k/n);sumds = sumds+fs(j)*sin(2*pi*(j-1)*k/n);sumcr = sumcr+fr(j)*cos(2*pi*(j-1)*k/n);sumdr = sumdr+fr(j)*sin(2*pi*(j-1)*k/n);

end % of jcs(k) = sumcs; ds(k) = sumds; cr(k) = sumcr; dr(k) = sumdr;gs(k)=sqrt(cs(k)^2+ds(k)^2)/n; gr(k)=sqrt(cr(k)^2+dr(k)^2)/n;

end % of k

figure(1)subplot(2,2,1); plot(fs, ’linewidth’, 2);title(’Half-sine pulse’,’fontsize’,12); % xlabel(’i’)subplot(2,2,3); plot((1:20),gs(1:20),’k’, (1:20),gs(1:20),’kx’);title(’Discrete Fourier spectrum’,’fontsize’,12); % xlabel(’k’)subplot(2,2,2); plot(fr, ’linewidth’, 2);title(’Rectangular pulse’,’fontsize’,12); % xlabel(’i’)subplot(2,2,4); plot((1:40),gr(1:40),’k’, (1:40),gr(1:40),’kx’);title(’Discrete Fourier spectrum’,’fontsize’,12); % xlabel(’k’)print VDFdsi1000 -deps% end of VDFdiscrete

Page 31: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 331

0 200 400 600 800 10000

0.2

0.4

0.6

0.8

1Half−sine pulse

0 5 10 15 200

0.05

0.1

0.15

0.2

0.25

0.3

0.35Discrete Fourier spectrum

0 200 400 600 800 10000

0.2

0.4

0.6

0.8

1Rectangular pulse

0 10 20 30 400

0.05

0.1

0.15

0.2

0.25

0.3

0.35Discrete Fourier spectrum

Figure 5.14: Discrete Fourier spectra

Page 32: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 332

5.7 Deriving governing equations

Deriving governing equations by free-body diagram approach, by energy methodsand by other approaches is the most difficult part of the vibration problem solving.It is fully described in Dynamics chapter.

5.8 Numerical methods

5.8.1 Numerical methods for steady state vibrationproblems

There are many problems in engineering practice in which it is required to find thenatural frequencies of vibrations of a structure. Often, the corresponding modesof vibrations (eigenmodes) are desired as well. In a case when a linear discretemodel is used, the free vibrations of an undamped structure is described byM�x +Kx = 0 whereM is the mass matrix,K is the stiffness matrix,x is the generalizeddisplacement and�x denotes the generalized acceleration. Assuming an harmonicsolution in the formx = �xeit, where is the angular (circular) frequency andtis time, we get a generalized eigenvalue problem for linear vibrations in the form(K� �M) �x = 0. Forn by n matrices we could findn pairs

��i; �x

(i)�

satisfying(K� �iM) �x(i) = 0 and the result could be written asK �X = M �X�, where �Xcontains the eigenvectors and� is a diagonal matrix containing eigenvalues on itsdiagonal. The eigenvalues correspond to squares of natural circular frequencies(eigenfrequencies)�i = 2

i and�x(i) are the modes of natural vibrations or simplyeigenmodes. The eigenvalues are usually sorted in ascending order�1 � �2 �: : : � �n.

In finite element analysis the mass matrix is symmetric and positive definite,the stiffness matrix usually is, but need not be, positive definite. The eigenproblemwith symmetric matrices leads to real eigenvalues. If the matrices are also positivedefinite, then all the eigenvalues are positive, i.e.0 < �1 � : : : � �n. Forproofs see [22]. The deformation energy stored in a structure in equilibrium isU =12xTb, whereb is the vector of external loading andx represents the generalized

displacements due to prescribed loading. This, together with equilibrium conditionsand constitutive relationsKx = b, allows one to express the deformation energyasU = 1

2xTKx. We can state that the stiffness matrix, together with generalized

displacements, constitutes a quadratic form. Since the energy needed for reachingthe deformed state of an initially unstressed structure is always positive we canconclude thatU > 0 for any nonzerox. Thus the positive definiteness is a propertyof the stiffness matrix. If the considered structure is not properly constrained to theframe, then it can move. It can be shown that the corresponding stiffness matrix

Page 33: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 333

is then positive semidefinite, its nullity being equal to the number of its rigid bodymodes and the corresponding eigenvalue problem gives a few zero eigenvalues at thebeginning of the spectrum. The number of zero eigenvalues is equal to the numberof rigid-body degrees of freedom of the structure under consideration. A similarreasoning could be provided for the kinetic energy stored in a structure whose nodeshave generalized velocities_x, that is forT = 1

2_xTM _x.

A solution of the problem with damping leads to complex eigenvalues andeigenvectors. See [20].

The generalized eigenvalue problem(K� �M) �x = 0 can be transformed intoa standard eigenvalue form by computingC =M�1K and solving(C� �I) �x = 0

instead. This approach, as easy as it looks, is far from being recommended sincethe matrixC is neither banded nor symmetric. (See [26]). The symmetry could besaved by the following process.

If the mass matrix is positive definite we could employ the Choleski decompo-sition forM ! RTR and rewrite the generalized problem into the standard onewith ~K~x = �~x, where ~K = R�TKR�1 and~x = R�x. The matrices are full, theirsymmetry is attained, and still this transformation makes the process ineffective forlarge-scale finite element analysis.

The eigenvalue problem is computationally more difficult than solving a linearsystem of equations. There are many well-established approaches known today,see [20], and still a lot of them fail to work when the size of involved matricesbecomes too large. As recently as in 1982 it was claimed that ’no efficient methodfor simultaneously obtaining all eigenvalues and eigenvectors is available’. See[24]. Nature is, however, kind to mechanical and civil engineers since only a smallnumber of eigenpairs from the opposite ends of the frequency spectrum is usuallyrequired.

There are several theorems, which are useful for understanding the eigenvalueproblem. See [22].

� A multiple of an eigenvector is also an eigenvector, since the eigenvectors aredetermined from a set of homogeneous equations whose coefficient matrixhas its determinant equal to zero.

� Each symmetric matrix can be diagonalized by a transformation� UTAU, where� is a diagonal matrix with eigenvalues on the diagonal andU is the modal matrix containing the eigenvectors columnwise.

� For eachn by n symmetric matrix one can determine a complete set ofnorthogonal eigenvectors.

� One can define the Rayleigh quotient byR = xTAx=�xTx

�. For symmetric

matrices its value is bounded by�1 � R � �n. Its minimum value isRmin =

Page 34: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 334

�min = �1 = (x(1) TA x(1))=(x(1)Tx(1)) = u(1) TAu(1), where the upper-right hand index is the eigenvector pointer andu(1) = x(1)=kx(1)k representsa normalized eigenvector. A similar relation is valid forRmax.

� The shift theorem assures that instead ofAx = �x we can solveBx = �x,whereB = A� �I and� = �� �.

There are many approaches to solving the eigenvalue problem. Due to the in-herent complexity of the problem the computational methods could fail sometimes,so one should not rely on a single method, rather backup computations using othermethods are to be made.

Transformation methods are based on a sequence of orthogonal transformationsthat lead to a diagonal or tridiagonal matrix. The resulting diagonal matrix has theeigenvalues stored directly on the diagonal; from a tridiagonal matrix they can beeasily ’extracted’.

We will mention here only the Jacobi transformation method which is employedby Matlab.

Jacobi method, a classical representative of transformation methods, is basedon subsequent rotations, and is schematically described in template T1. It is shownhere for a standard eigenvalue problem.

Template T1 – Jacobi method for a standard eigenvalue problem(A� �I)x = 0.(0)A = A

for k = 1,2, ...(k)A = (k)TT (k�1)A (k)T ! eigenvalues

check convergence

end(k)U = (1)T (2)T : : :(k)T ! eigenvectors

For k!1 the sequence leads to (k)A! �; (k)U! U

Notes:

� Matrix � is diagonal, it contains all the eigenvalues. Generally, they are notsorted in any order.

� Matrix U is a so-called modal matrix. It contains all eigenvectors – column-wise. It is not symmetric.

� The bandedness of matrixA cannot be exploited. There is a massive fill-inbefore the coefficient matrix finally becomes diagonal. See [25].

Page 35: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 335

Template T2 – The Jacobi transformation matrix.

t = 0

for i = 1 to n

t(i,i) = 1

end

c = cos ( �); s = sin ( �)

t(p,p) = c; t(p,q) = s; t(q,p) = -s; t(q,q) = c;

The Jacobi method uses the transformation matrixT in the form shown in tem-plate T2 with trigonometrical entries inp-th andq-th columns and rows only, withones on the diagonal and zeros everywhere else. In each iteration the procedure isbased on such a choice of rotations that leads to zeroing the largest out of out-of-diagonal element. For details see [25]. The generalized Jacobi method could beconceived in such a way that the transformation of generalized eigenvalue probleminto a standard form could be avoided. See [2].

A commandhelp eig reveals how to proceed when solving standard and/orgeneralized eigenproblem in Matlab.

help eig

EIG Eigenvalues and eigenvectors.E = EIG(X) is a vector containing the eigenvalues of a squarematrix X.

[V,D] = EIG(X) produces a diagonal matrix D of eigenvalues and afull matrix V whose columns are the corresponding eigenvectors sothat X*V = V*D.

[V,D] = EIG(X,’nobalance’) performs the computation with balancingdisabled, which sometimes gives more accurate results for certainproblems with unusual scaling.

E = EIG(A,B) is a vector containing the generalized eigenvaluesof square matrices A and B.

[V,D] = EIG(A,B) produces a diagonal matrix D of generalizedeigenvalues and a full matrix V whose columns are thecorresponding eigenvectors so that A*V = B*V*D.

See also CONDEIG, EIGS.

Solving a vibration problem defined by mass and stiffness matricesM andKin engineering leads to a generalized eigenvalue problem. Matlabeig command isthen as follows

[V,D] = EIG(K,M),

Page 36: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 336

whereV is an eigenmode matrix, storing eigenvectors columnwise andD is adiagonal matrix containing eigenvalues on corresponding diagonal entries. Eigen-frequencies are square roots of eigenvalues and are not stored according to theirmagnitudes.

Page 37: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 337

5.8.2 Numerical methods for transient problems

Transient problems of solid mechanics in their discretized form are usually de-scribed by a system of ordinary second order differential equations. The spatialdomain is usually discretized by finite elements, by which the partial differentialequations of continua in space and time variables are replaced by a system of or-dinary differential equations in time. This system is then discretized in time usingvarious time integration methods.

The aim of computational procedures used for the solution of transient problemsis to satisfy the equation of motion, not continually, but at discrete time intervalsonly. It is assumed that in the considered time spanh0; tmaxi all the discretizedquantities at times0;�t; 2�t; 3�t; : : : ; t are known, while the quantities at timest + �t; : : : ; tmax are to be found. The quantity�t, being the time step, need notnecessarily be constant throughout the integration process.

Time integration methods can be broadly characterized as explicit or implicit.Explicit time integration algorithmsExplicit formulations follow from the equations of motion written at timet.

Corresponding quantities are denoted with a left superscript as in the equation ofmotion written in the formM t�q = tFres. The residual forceFres = Fext � Fint isthe difference of external and internal forces.

The vector of internal forces can alternatively be written astFint = tD t _q +tK tq whereM, tD andtK are the mass, viscous damping and stiffness matrices,respectively andt�q, t _q andtq are nodal accelerations, velocities and displacements.In structural solid mechanics problems the mass matrixM does not change withtime.

A classical representative of the explicit time integration algorithm is the centraldifference scheme.

If the transient problem is linear, then the stiffness and damping matrices areconstant as well. Substituting the central difference approximations for velocitiesand accelerations

t _q =�t+�tq� t��tq

�= (2�t) ;

t�q =�t+�tq� 2 tq+ t��tq

�=�t2

(5.57)

into the equations of motion written at timet we get a system of algebraic equationsfrom which we can solve for displacements at timet+�t namelyMe� t+�tq = Fe�

where the effective quantities are

Me� =M=�t2 +D= (2�t) ;

Fe� = tFext ��K� 2M=�t2

�tq�

�M=�t2 �D= (2�t)

�t��tq:

(5.58)

The last term in the expression for the effective force indicates that the processis not self-starting. A possible Matlab implementation is as follows.

Page 38: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 338

function [disn,veln,accn] = ...VTRcedif(dis,diss,vel,acc,xm,xmt,xk,xc,p,h)

% central difference method

% dis,vel,acc ...... displacements, velocities, accelerations% at the begining of time step ... at time t% diss ............. displacements at time t - h% disn,veln,accn ... corresponding quantities at the end% of time step ... at time t + h% xm ............... mass matrix% xmt .............. effective mass matrix% xk ............... stiffness matrix% xc ............... damping matrix% p ................ loading vector at the end of time step% h ................ time step

% constantsa0=1/(h*h);a1=1/(2*h);a2=2*a0;a3=1/a2;

% effective loading vectorr=p-(xk-a2*xm)*dis-(a0*xm-a1*xc)*diss;% solve system of equations for displacementsdisn=xmt\r;

% new velocities and accelerationsaccn=a0*(diss - 2*dis + disn);veln=a1*(-diss + disn);% end of VTRcedif

The process is effective if the mass matrix is made diagonal by a suitable lump-ing process. The damping matrix needs to be diagonal as well. The inversion ofMe� is then trivial and instead of a matrix equation we simply have the set of indi-vidual equations for each degree of freedom and no matrix solver is needed.

Stability analysis of explicit and implicit schemes has been studied for a longtime. Park [21] has investigated stability limits and stability regions for both linearand nonlinear systems. A comprehensive survey showing a variety of approaches ispresented by Hughes in [3]. See also [1].

The explicit methods are only conditionally stable; the stability limit is approx-imately equal to the time for elastic waves to transverse the smallest element. Thecritical time step securing the stability of the central difference method for a linearundamped system is (see [21])�tcr = 2=!max being the maximum eigenfrequency,related to the maximum eigenvalue�max of the generalized eigenvalue problemKq = �Mq by !2 = �. Practical calculations show that the result is also appli-cable to nonlinear cases, since each time step in nonlinear response can roughly be

Page 39: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 339

considered as a linear increment of the whole solution.Finding the maximum eigenvalue of the system is an expensive task, especially

in nonlinear cases where eigenvalues of the system change with time and economyconsiderations require us to change the time step as the solution evolves. It hasbeen proved, however, that the maximum eigenvalue of the system is bounded bythe maximum eigenvalue of all the elements assembled in the considered system(see [9]) which simplifies the problem considerably and permits to march in timeefficiently, using a variable time step. This allows, for example, decreasing the valueof the time step if the system stiffens. The proper choice of time step for explicitmethods was until recently a matter of a judicious engineering judgment. Today,many finite element transient codes do not rely on the user and calculate the correcttime step automatically.

Explicit time integration methods are employed mostly for the solution of non-linear problems, since implementing complex physical phenomena and constitutiveequations is then relatively easy. The stiffness matrix need not be assembled so thatno matrix solver is required, which saves computer storage and time. The main dis-advantage is the conditional stability, which clearly manifests itself in linear prob-lems, where the solution quickly blows up if the time step is larger than the criticalone. In nonlinear problems results calculated with a ’wrong’ step could contain asignificant error and may not show immediate instability.

Implicit time integration algorithmsThe implicit formulations stem from equations of motion written at timet+�t;

unknown quantities are implicitly embedded in the formulation and the system ofalgebraic equations must be solved to ’free’ them. In structural dynamic problemsimplicit integration schemes give acceptable solutions with time steps usually oneor two orders of magnitude larger than the stability limit of explicit methods.

Perhaps the most frequently used implicit methods belong to the Newmark fa-mily. The Newmark integration scheme is based upon an extension of the linear ac-celeration method, in which it is assumed that the accelerations vary linearly withina time step.

The Newmark method consists of the following equations [17]

M t+�t�q+ t+�tD t+�t _q+ t+�tK t+�tq = t+�tFext; (5.59)

t+�tq = tq +�t _q+1

2�t2

�(1� 2�) t�q+ 2� t+�t�q

�;

t+�t _q = t _q+�t�(1� ) t�q+ t+�t�q

�;

(5.60)

which are used for the determination of three unknownst+�t�q, t+�t _q and t+�tq.The parameters� and determine the stability and accuracy of the algorithm andwere initially proposed by Newmark as� = 1=4 and = 1=2 thus securing theunconditional stability of the method, which means that the solution, for any set of

Page 40: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 340

initial conditions, does not grow without bound regardless of the time step. Un-conditional stability itself does not secure accurate and physically sound results,however. See [3], [12], [27].

With the values of� and mentioned above, the method is sometimes referredto as the constant-average acceleration version of the Newmark method, and iswidely used for structural dynamic problems. In this case the method conservesenergy.

For linear problems the mass, damping and stiffness matrices are constant andthe method leads to the repeated solution of the system of linear algebraic equationsat each time step giving the displacements at timet + �t by solving the system,Ke� t+�tq = Fe� where the effective quantities are

Ke� = K+ a0M+ a1D;

Fe� = t+�tFext +M�a0

tq+ a2t _q+ a3

t�q�+D

�a1

tq+ a4t _q + a5

t�q� (5.61)

where

a0 = 1=���t2

�; a1 = = (��t) ; a2 = 1= (��t) ;

a3 = 1= (2�)� 1; a4 = =� � 1; a5 =1

2�t ( =� � 2) ;

a6 = �t (1� ) ; a7 = �t :

(5.62)

The last two parameters are used for calculating of the accelerations and velocitiesat timet +�t

t+�t�q = a0�t+�tq� tq

�� a2

t _q� a3t�q;

t+�t _q = t _q+ a6t�q + a7

t+�t�q:(5.63)

An efficient implementation of the Newmark methods for linear problems requiresthat direct methods (e.g. Gauss elimination) be used for the solution of the system ofalgebraic equations. The effective stiffness matrix is positive definite, which allowsproceeding without a search for the maximum pivot. Furthermore the matrix isconstant and thus can be factorized only once, before the actual time marching, andat each step only factorization of the right hand side and backward substitution iscarried out. This makes Newmark method very efficient; the treatment of a problemwith a consistent mass matrix requires even less floating point operations than thatusing the central difference method.

A possible Matlab implementation is as follows.

function [disn,veln,accn] = ...VTRnewmd(beta,gama,dis,vel,acc,xm,xd,xk,p,h)

% Newmark integration method%% beta, gama coefficients% dis,vel,acc displacements, velocities, accelerations

Page 41: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 341

% at the begining of time step% disn,veln,accn corresponding quantities at the end% of time step% xm,xd mass and damping matrices% xk effective rigidity matrix% p loading vector at the end of time step% h time step%% constantsa1=1/(beta*h*h);a2=1/(beta*h);a3=1/(2*beta)-1;a4=(1-gama)*h;a5=gama*h;a1d=gama/(beta*h);a2d=gama/beta-1;a3d=0.5*h*(gama/beta-2);% effective loading vectorr = p + ...

xm*(a1*dis+a2*vel+a3*acc)+xd*(a1d*dis+a2d*vel+a3d*acc);% solve system of equations for displacements xkdisn=xk\r;% new velocities and accelerationsaccn=a1*(disn-dis)-a2*vel-a3*acc;veln=vel+a4*acc+a5*accn;% end of VTRnewmd

Examples of using central difference and the Newmark methods are in 5.10.2.If � 1

2and� = 1

4

�12+ �2

the method is still unconditionally stable but apositive algorithmic damping is introduced into the process. With < 1

2a nega-

tive damping is introduced, which eventually leads to an unbounded response. Withdifferent values of parameters�, , the Newmark scheme describes a whole seriesof time integration methods, which are sometimes called the Newmark family. Forexample if� = 1

12and = 1

2, it is a well known Fox-Goodwin formula, which

is implicit and conditionally stable, else if = 12

and� = 0, then the Newmark’smethod becomes a central difference method, which is conditionally stable and ex-plicit.

The algorithmic damping introduced into the Newmark method, by setting theparameter < 1

2and calculating the other parameter as� = 1

4

�12+ �2

is fre-quently used in practical computations, since it filters out the high-frequency com-ponents of the mechanical system’s response. This damping is generally viewed asdesirable, since the high-frequency components are very often mere artifacts of fi-nite element modelling, they have no physical meaning and are consequences of thediscrete nature of the finite element model and its dispersive properties. See [19].

It is known that algorithmic damping adversely influences the lower modes inthe solution. To compensate for the negative influence of algorithmic damping on

Page 42: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 342

the lower modes behaviour Hilber [11], Hilber and Hughes [10] modified Newmarkmethod with the intention of ensuring adequate dissipation in the higher modes andat the same time guaranteeing that the lower modes are not affected too strongly.The results of detailed numerical testing of Hilber and classical Newmark integra-tion methods appear in [18].

A comprehensive survey of the algorithmizations of Newmark methods and alsoof other implicit integration methods is presented in [27].

Matlab offers very efficient tools for the integration of ordinary differentialequations of the first order. They are based on Runge-Kutta methods (see [13]) ofdifferent orders with an automatic choice of the time step. Use Matlab commands

help ODEFILE andODE23, ODE45, ODE113, ODE15S, ODE23S, ODE23T, ODE23TBoptions handling: ODESET, ODEGEToutput functions: ODEPLOT, ODEPHAS2, ODEPHAS3, ODEPRINTodefile examples: ORBITODE, ORBT2ODE, RIGIDODE, VDPODE

for more details.

An example showing a possible use of Matlab build in procedure namedode45

for the solution of the forced vibration of an one-degree-of-freedom system withprescribed initial conditions is provided by the programVTRtode.m and functionalprocedurevtronedofnum.m .

Usingode procedures one has to rewrite each differential equation of the secondorder into a system of two differential equations of the first order. In our case wecould proceed as follows

m�x + b _x + kx = A sin (!t): (5.64)

Defining2 = k=m, B = b=m andA0 = A=m we have

�x +B _x +2x = A0 sin (!t): (5.65)

Introducing a new variablez = _x we get two first order differential equations in-stead of (5.65), namely

_x = z;

_z = �Bz � 2x+ A0 sin (!t):(5.66)

Renaming variables so that they form a ’vector’ by

y1 = x;

y2 = z:(5.67)

we finally have_y1 = y2;

_y2 = �By2 �2y1 + A0 sin (!t):(5.68)

Page 43: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 343

% VTRtode% test ode procedure for one dof ... see vtronedofnum.m% m*xddot + b*xdot + k*x = A*sin(omega*t)% xddot = -b*xdot/m - k*x/m + A*sin(omega*t)/m% xddot = -B*xdot -OMEGA2*x + A0*sin(omega*t)% let’s introduce% xdot = z; xddot = zdot;% then% zdot = -B*z -OMEGA*x + A0*sin(omega*t)% define new variables% y1 = x ... displacement% y2 = z ... velocity% and finally we have two ordinary diff. equations% ydot1 = y2% ydot2 = -B*y2 - OMEGA*y1 + A0*sin(omega*t)%cleary0 = [1 0]; % initial conditionstspan = [0 2.5]; % time domainm = 400; % massk = 60000; % stiffnessb = 1000; % damping coeffB = b/m;OMEGA2 = k/m; % square of natural frequency% f = 2; % excitation frequency in Hz% omega = 2*pi*f; % corresponding circular frequencyomega = 10*sqrt(OMEGA2);A0 = 1000; % amplitude[t,y]=ode45(’vtronedofnum’,tspan,y0,[],B,OMEGA2,A0,omega);figure(1)subplot(2,1,1); plot(t,y(:,1),’k’,’linewidth’,2);title(’displacement’);gridsubplot(2,1,2); plot(t,y(:,2),’k’,’linewidth’,2);title(’velocity’);grid[omega sqrt(OMEGA2)]print VTRtode -deps; print VTRtode -dmeta% end of VTRtode

function dy = vtronedofnum(t,y,flag,B,OMEGA2,A0,omega);% define the ode equation of the second order% m*xddot + b*xdot + k*x = A*sin(omega*t)% xddot = -b*xdot/m - k*x/m + A*sin(omega*t)/m% xddot = -B*xdot -OMEGA2*x + A0*sin(omega*t)% let’s introduce% xdot = z% then% zdot = -B*z -OMEGA2*x + A0*sin(omega*t)% define new variables% ydot1 = y2

Page 44: Chapter 5 Vibrations - cvut.czfsinet.fsid.cvut.cz/en/U2052/Vibrations_part_one.pdf · Chapter 5 Vibrations 5.1 Introduction to vibration The subject of vibration - a subset of dynamics

CHAPTER 5. VIBRATIONS 344

% ydot2 = -B*y2 - OMEGA2*y1 + A0*sin(omega*t)% define new variables% y1 = x ... displacement% y2 = z ... velocity% and finally we have two ordinary diff. equations% whose matlab interpretation is

dy = zeros(2,1);dy(1) = y(2);dy(2) = -B*y(2) - OMEGA2*y(1) + A0*sin(omega*t);

% end of vtronedofnum

The output ofVTRtode is in Fig. 5.15

0 0.5 1 1.5 2 2.5−1

−0.5

0

0.5

1

1.5displacement

0 0.5 1 1.5 2 2.5−30

−20

−10

0

10

20velocity

Figure 5.15: Particle displacement and velocity of the one-degree-of freedom sys-tem - numerical solution byode45 procedure