You are on page 1of 4

The University of Auckland

Department of Civil and Resource Engineering


Applied Structural Mechanics

Time-history analysis – single degree of freedom systems


Closed form analytical solution of the equation of u&&( τ ) = (u&&i + u&&i+1 ) / 2 .
motion of a single degree of freedom system is not
usually possible if the excitation (applied force or Integrating:
ground acceleration) is an arbitrary function of u&(τ ) = ( u&&i + u&&i+1 )τ / 2 + A
time or if the system is nonlinear. One of a variety
of numerical methods will normally be required. But u&( 0) = u&i , so A = u&i ,
For example, the Duhamel integral can be
evaluated numerically for linear systems. An and u& ( ∆ ti ) = u&i +1 , so u&i +1 = (u&&i + u&&i +1 ) ∆ti / 2 + u&i
alternative is to use one of the step by step or u&i +1 = u&i + ( u&&i + u&&i +1 ) ∆ti / 2 (2)
procedures in which the state of the system is
determined at small time increments, each state Integrating:
being calculated from its immediate predecessor. u( τ ) = (u&&i + u&&i +1 ) τ 2 / 4 + u&i τ + B
We consider here one such approach known as
the constant average acceleration method. But u( 0) = ui , so B = ui .
Also u( ∆ ti ) = ui +1 , so
Constant average acceleration method
ui +1 = u i + (u&&i + u&&i+1 ) ∆t i / 4 + u&i ∆t i
2
(also known as Newmark β=¼ method) (3)

displacement relative
Incremental quantities:
∆u i = u i+1 − u i
to ground,
u(t) Let

ground spring, stiffness ∆u&i = u&i+1 − u&i


displacement,
k
ug(t)
mass,
∆u&&i = u&&i+1 − u&&i
damper, coeff. m
c From (3),
∆u i = ( 2u&&i + ∆u&&i )∆ ti / 4 + u&&i ∆t i
2

∆u&&i = 4( ∆ ui − u& i ∆t i ) / ∆ ti − 2u&&i


2
(4)
Consider a single degree of freedom system as From (2),
shown above, with governing equation
2 ∆ui
u&& + 2 ξωu& + ω 2u = −u&&g (1) ∆u&i = − 2u&i (5)
∆ti
Assume that the displacement and velocity at time Since governing equation (1) is satisfied at both ti
zero, u0 , u&0 are known. As a result of the ground and ti+1, substitute in (1) for ti and ti+1 and subtract
motion the mass develops accelerations which to get
may be as shown below. In particular we assume ∆u&&i = − ∆u&&gi − 2ξω∆u&i − ω2 ∆ ui (6)
that in the time interval ∆ti , the acceleration can
be approximated by the mean of the end values in Solving (4), (5) and (6) for ∆ui –
the interval. 4u& i
+ 2u&&i + 4ξωu&i − ∆u&&gi
∆u i = ∆t , or
u&&(t ) 4 4 ξω
+ +ω 2

∆ti
2
∆t i
mean
C1∆ ui = − ∆u&&gi + C 2 u&i + 2u&&i (7)

τ
4 4 ξω
Where C1 = + + ω 2 , and
ti ti +1 ∆ ti 2
∆t i
∆t
 1 
Let τ denote time as measured from the start of
C2 = 4  ξω + 
 ∆ti 
the interval. Hence

d:\document\asm\asm2001\notes\timehist.doc jwb 24/04/01


and both C1 and C2 are constant if ∆ti is constant. Typing ‘help th’ at the Matlab prompt will write
some helpful information to the screen.
Algorithm
Copying and running the Matlab program
1. u 0 and u&0 assumed known. 1. The necessary files can be downloaded from
2. u&&0 = −u&&g 0 − 2ξωu&0 − ω2 u&0 from equ. (1). the Applied Structural Mechanics section under
student info on the Civil Engineering web page
3. Solve (7) for ∆ui .
at http://www.care.auckland.ac.nz.
4. Solve (5) for ∆u&i . 2. Copy the files th.m, thdemo.m and elcen.dat to
5. Solve (4) for ∆u&&i a convenient subdirectory on your network H:
6. Update ui +1 = ui + ∆ui drive or elsewhere.
3. Start Matlab in the usual way.
u&i +1 = u&i + ∆u&i 4. At the Matlab prompt, type
u&&i +1 = u&&i + ∆u&&i »cd H:\matlab (or whatever name you gave to
7. Repeat steps 3 to 6. your new directory).
»thdemo (to run the example)
Spreadsheet 5. Modify the demo file or create a new one to
solve the specified problems (you can always
There is a spreadsheet ‘time-hist.xls’ that can be re-copy the initial files if things go wrong….).
freely downloaded or run from the web site,
http://www.care.auckland.ac.nz/~.jbut030.users/C File contents
ourses/655.412/time-hist.xls.
th.m is a Matlab script file containing the time-
history solution function.
Implementation using Matlab
thdemo.m is a Matlab script file showing how to
The procedure is readily programmed, especially use the time-history function to solve a simple
when the time step ∆t, is constant (usual case). problem of response to a linear acceleration pulse.
The sample Matlab function ‘th’ (time-history) elcen.dat is a numerical data file containing the
listed later uses the method just described and can first 20 seconds of the El-Centro 1940 N-S
be applied to a linear SDOF system or to a group acceleration record. Data is in mm/sec2 units at
of SDOF systems (see later under modal analysis 0.02sec intervals. The data is arranged as a single
methods for MDOF systems). column so that it can be readily imported into a
The right hand side ‘th(w,xi,ug,dt,p,nout)’, spreadsheet if desired.
contains the input arguments and the left hand side To enter the El-Centro data into Matlab include
[Y,Ymax,Vmax,Amax], is used to supply the the following in your program (or type it at the
names of the output arguments. prompt):
»load elcen.dat;
Required input »elcen=elcen′;
The following arguments must be assigned values This will create a row vector ‘elcen’ containing the
or replaced by constants acceleration data.
‘w’ - natural frequency, ω (rad/sec).
‘xi’ - damping ratio, ξ. Demonstration example
‘ug’ - row vector of ground accelerations, u&&g . A structure has a period T=0.4sec and a damping
ratio ξ=0.0. An underground explosion causes a
‘dt’ - time interval ∆t, between values in u&&g .
ground acceleration consisting of a symmetric
‘p’ - set p=1 for SDOF systems. triangular pulse of 1 second duration during which
‘nout’ - frequency of output values in u(t) the acceleration rises linearly to a peak of
2000mm/sec2 in 0.5sec and then falls linearly to
Output zero at 1second.
‘Y’ - column vector of displacements u(t) at It is required to calculate the displacement time-
time intervals nout × ∆t . history for the 1.5 seconds following the arrival of
‘Ymax’ - maximum displacement u( t ) max the pulse.
‘Vmax’ - maximum velocity u& ( t ) max
&&( t ) + u&&g ( t )
‘Amax’ - maximum acceleration u max

Help
u&&g ( t ) (mm / sec 2 ) u&&g (τ ) = 4000τ ( 0 ≤ τ ≤ 0.5)
u&&g (τ ) = 4000 (1 − τ ) (0.5 ≤ τ ≤ 1.0)
2000
0 - 0.5sec
− 4000τ
t
u (t ) = ∫ sin ω( t − τ) dτ
0
ω
− 4000
= ( ωt − sin ωt )
0.5 1.0 1.5 ω3
The problem is solved using step by step
integration and then by means of Duhamel’s 0.5 - 1.0sec
integral. 0.5
− 4000τ − 4000(1 − τ )
t
u (t ) = ∫ ω
sin ω( t − τ )dτ + ∫
ω
sin ω( t − τ) dτ
Step by step integration solution 0 0.5
− 4000
The file thdemo.m whose listing is given below = [2 sin ω( t − 0.5) − sin ωt − ω( t − 1) ]
ω3
contains the necessary instructions to solve the
problem. The acceleration data is created directly
as a matrix ‘constant’ with values specified at 1.0 - 1.5sec:
0.5
− 4000τ
1
0.01sec intervals. The other parameters are − 4000(1 − τ)
defined and the time-history function invoked to
u (t ) = ∫0 ω sin ω( t − τ) dτ + 0∫.5 ω sin ω( t − τ) dτ

generate the solution. − 4000


= [2 sin ω( t − 0.5) − sin ω(t − 1) − sin ωt ]
ω3
Duhamel integral solution
The simple form of the acceleration data makes The expressions above can be conveniently
Duhamel reasonably easy to apply (although evaluated and plotted using a spreadsheet. The
nonzero damping would complicate matters a figure below shows the results from both Duhamel
little). Because the acceleration is not a continuous and the step by step procedure.
function of time it must be considered in discrete
ranges within which it is continuous:
4.0

2.0 Step by step integration


Duhamel Integral
Displacement, u(t) (mm)

0.0

-2.0

-4.0

-6.0

-8.0

-10.0

0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4


Time (s)

MATLAB FILES
Demo file - ‘thdemo.m’
% script to test time history solution
% triangular acceleration pulse of 1sec
T=0.4;
xi=0.0;
% set up vector of accelerations at 0.01sec intervals
accel=[0:40:2000 1960:-40:0 zeros(1,50)];
w=2*pi/T;
dt=0.01;
p=1;
nout=2;
[U,Umax,Vmax,Amax]=th(w,xi,accel,dt,p,nout);
% set up time axis for plotting (every 2nd point used)
timebase=[0:nout*dt:size(accel,2)*dt-dt];
figure(1); plot(accel);
xlabel('time'); ylabel('ground acceleration (mm/s/s)');
figure(2); plot(timebase,U,'-',timebase,U,'o');
xlabel('time (sec)'); ylabel('displcement (mm)');
disp('Maximum displacement');
Umax

Time-history function - ‘th.m’


% Time History Analysis - step by step integration
% for linear SDOF or MDOF systems (modal)
% Constant average acceleration algorithm
%
% function [Y,Ymax,Vmax,Amax]=th(w,xi,ug,dt,p,nout)
%
% INPUT ARGUMENTS
%---------------------------------------------------------------------
% SDOF | MDOF
%---------------------------------------------------------------------
% w natural frequency | modal frequencies (column vector)
% xi damping ratio | modal damping ratios (column)
% ug ground accel record (row) | ground accel record (row)
% dt time interval in ug |
% p 1 | modal participation factors (column)
% nout output intervals (ie every nout'th step)
%
% OUTPUT ARGUMENTS
%---------------------------------------------------------------------
% SDOF | MDOF
%---------------------------------------------------------------------
% Y displacement (row) | modal amplitude (in rows)
% Ymax max displacement | max modal amplitudes (column)
% Vmax max relative velocity | max modal velocity (column)
% Amax max abs acceleration | max modal acceleration (column)
%
% EXAMPLE:
% load elcen.dat;
% ug=elcen';
% T=0.5; xi=0.05; w=2*pi/T; dt=0.02;
% [u,umax,vmax,amax]=th(w,xi,ug,dt,1,4);
% [umax vmax amax]
% figure(1);
% plot(u);

function [Y,Ymax,Vmax,Amax]=th(w,xi,ug,dt,p,nout);

nstp = size(ug,2);
Y=zeros(size(p,1),1);
Ymax=Y; Vmax=Y; Amax=Y;
A=w.*w+4/dt*(xi.*w)+4/dt^2;
B=4*(xi.*w+1/dt);
u=0;
ud=0;
udd=-p*ug(1)-2*xi.*w.*ud-w.*u; j=1;
for i=2:nstp
du=(p.*-(ug(i)-ug(i-1))+B.*ud+2*udd)./A;
dud=2*du/dt-2*ud;
dudd=4*(du-ud*dt)./(dt.*dt)-2*udd;
u=u+du;
ud=ud+dud;
udd=udd+dudd;
Ymax=max(Ymax,abs(u));
Vmax=max(Vmax,abs(ud));
Amax=max(Amax,abs(udd+ug(i)));
if nout*fix((i-1)/nout)==i-1, j=j+1;, Y(:,j)=u;, end;
end;

You might also like