Professional Documents
Culture Documents
On The Simulation of Stochastic Processes by Spectral Representation
On The Simulation of Stochastic Processes by Spectral Representation
On The Simulation of Stochastic Processes by Spectral Representation
105-113, 1997
© 1997ElsevierScienceLtd. All rights re~rved
Printed in Great Britain.
ELSEVIER Pll: S0266-8920(96)00039-2 0266-8920/97 $17.00+ 0.00
g(w) = 2Sfo(w) cos(wr) (16) and g'(Wu) is negligible; therefore, the end correction
vanishes. The trapezoidal rule with end correction for
is introduced. Thus, it yields for the derivative of g(w) the integral (20) is equivalent to the classical trapezoidal
with respect to w rule; however, the result remains of order 1/N 4.
g'(a;): = dg(w) Moreover, the value g(wu) is also negligible. The main
- 2S~0(w) cos(wr) - 2rSfo (w) sin(wr) difference between Rf(r) and R~0(r) is the quantity g(0)
dw
Aw/2. However, this quantity can be approximately
(17)
compensated for by modifying the coefficients A1 and A2.
According to the derivation in Shinozuka and The following mathematical explanation shows that
Deodatis, 3 the ensemble autocorrelation function Rf(r) using the modified simulation formula, the autocorrela-
of the simulated stochastic processf(t) reads as follows: tion function R/(r) for a fixed time lag r converges to
N-I N-I the target autocorrelation function R~o(r) with order
Ri(~) = E A.~c°s(~.~) = ~ g(nZX~)A~ (18) 1/N 4. It yields for the difference between the ensemble
n=0 n=l autocorrelation function R/(r) and the target auto-
correlation function R~0(r)
Similarly, it remains that the ensemble autocorrelation
function Ry(r) of the simulated stochastic process/(t) el(r): = R/(T) - R~o(r) (24)
using eqns (12) and (13) is
4
N-I : - ~ [g(0) + g(cou)lAw + ~ Sfo(0)cos(Awr)~w
R/(,) = ~ A.~cos(~.~) -- sfo(0) cos(Zx~7)~x~
n=0 1
3 sfo (0) cos(ZA~7)~
N-1
1 Sfo (0) COs(2Awr)Aw + E g(nAw)Aw 1
3 n=l 12 (Aw)Z[g'(0) -g'(Wu)] - ~ (Aw)4g(4)(~)
(19) (25)
On the other hand, it is valid for the target autocorrela- Since the spectral function Sfo (w) is an even function, i.e.
tion function from eqn (16)
Sfo (w) = Sfo (-w) (26)
R~o(r) = g(w)dw (20)
differentiating the two sides of this equation at w = 0
According to eqns (18) and (20), in addition to yields
S(wu) = 0g i.e. g(Wu) = 0 (21) S)0 (0) = 0 (27)
it can be seen that the autocorrelation function Rf(r) From eqns (17) and (27), it can be seen that eqn (23)
corresponds to the approximate value of the integral holds true. Furthermore, according to the assumption of
(20) computed with the rectangular rule. It converges to eqn (1), the spectral function Sfo(w) and its derivative
the target autocorrelation function R~0(r) with the order S'fo(W) at w = Wu can be also assumed to be zero, i.e.
1/N. The error ef(7) is given in eqn (11).
The idea of the proposed modification is explained as Sfo(wu) = 0, S)0(Wu)= 0 (28)
follows. Due to some characteristics of the spectral
density function Rfo (r), it is found that for the integral The reason for this assumption is
(20) the trapezoidal rule with end correction may be lim Sfo(~o) = 0 and lira s)0(~)
' = 0 (29)
used instead of the rectangular rule, while the simulation ~d ---~ fX) a ) -'-* fX)
formula suitable for F F T remains almost the same. which can be proved with Barbalat's Theorem (see
According to the trapezoidal rule with end correction Slotine and Li 7) Therefore, for a large upper cut-off
for the numerical integration yields frequency w~, the values of Sfo(Wu) and 5}0(% ) are, in
general, very small and their contribution to the
R~o(T) = g(O) + Z g(nAw) + ~g(w u Aw autocorrelation function can be neglected as can the
n=l admissible error, eRfo(O).
Furthermore, from eqns (16), (17) and (28), it follows
+ ~ ( ~ ) 2 [g,(0) - g' (~.)] + ~ ( Ato)4g(4) (~) directly that:
iz
(22) g(wu) = 0 and g'(Wu) = 0 (30)
108 B. Hu, W. Schiehlen
Hence, eqn (25) becomes least with the order 1IN 4 as N ~ ~ . It can be seen that
for Sfo (0) = 0, the rate of convergence of autocorrelation
e](r)=-Sfo(O)Aw[1 - ~cos(Awr)4 + ~cos(2Awr)]l Rf(7-) to R~o(T) for the original simulation formula is in
fact of order 1/N 4. For Sfo (0) # 0 the small modification
~2u0 (A6°)4g (4) (4) (31) in the coefficients A1 and A2 improves the rate of
convergence of autocorrelation function greatly.
Now, defining a function
4 1
e0(x): = 1 - gcos x + ~cos 2x (32) 4 ACCURACY OF THE S I M U L A T I O N
FORMULAE
(see Fig. 1) yields for the derivatives of eo(x) at x = 0
It should be pointed out that the convergences with both
e0(0 ) = 0 , e~(0):0, eg(0)=0, e~3)(0):0
simulation formulae are not uniform for all time lags 7-.
(33) Using the spectral representation method to simulate a
stationary stochastic process, one can in fact only rely
and for the fourth derivative
on the autocorrelation function Rf(-c) or Rf(7-) for 17-1<
le~4)(x)l = -4~cos x + ~ c o s 2x ~< ~ (34) To~2 since the sample functions f(t) and f(t) are
periodical functions with the period To. However, no
matter how large the sampling number N is, both
Moreover, according to the Euler-Maclaurin series, one
autocorrelation functions Rf(7-) and Rf(T) do not
gets
converge to R}0(r ) uniformly for all N<<,To/2. Since
for a very large time lag, T >> 1 S, the fourth derivative
eo(Awr ) = e0")(717-)' (A~T) 4 (35)
g(4)(() is approximately proportional to 7-4, the error
4!
where r/E (0, Aw). It follows from eqns (34) and (35) el(7-) depends on the quantity (Awr) 4. In the applica-
that: tion of the modified simulation formula, for the purpose
of high accuracy, it is suggested that the autocorrelation
leo(Aw¢)[<< 20 (AwT-)4 _ 5 (AwT)4 (36) function Rf(7-) is only used for 17-1~<l/A~=
3 24 18 To/27-: = 7-max. Moreover, since for a small time lag
Furthermore, from 7- << 1 s, the error e/(7-) is approximately proportional to
(Aw) 4, it is also suggested that in the simulation the
e]('r) = -Sfo(O)Aweo(AwT ) - ~ 0 (Aw)4g(4)(~) (37) frequency step Aw should be chosen no larger than one
radian per second, i.e. Aw~< 1 rad s -1.
In addition, it is noted that in the modified simulation
le/(7-)l Sfo(O)Awleo(/X )l + (mw)4Ig(4)(4) 1 formula, the principal part -Sf0(0)Aw in the error ef(T)
~5 Sfo(O)7-4o35.~_~ o 2 5 (38)
is changed to -Sfo (O)Aweo(AWT-) so that the error el(T)
converges to zero with order Aw 4. From Fig. 1, it can be
seen that this modification is meaningful only for
follows, where Mg denotes max~e[0,~.l Ig(4)(w)l and is
IAwT-I~<l, i.e. [7-[~<7-max" For [Awr I > 1.8, the main
dependent on r. Therefore, for fixed values of the time
error -Sfo (O)Aweo(AwT-) in el(7-) is even worse than the
lag 7-, it has been proved that the ensemble correlation
original -Sf0(0)Aw. Moreover, since the coefficients A0
function R](T) of the simulated stochastic process f(t)
and A0 are chosen as zero in both simulation formulae
converges to the target correlation function R~0(7-) at such that their temporal mean values averaged over the
3.0 whole simulation time To remain zero, it follows that
integrations of the autocorrelation functions Rf(7-) and
.Rf(7-) over the region 17-1~ To~2 are also equal to zero,
I.e.
2.0
1.0
From eqns (10) and (39), it follows directly that:
0.0
0.0 2.0 4.0 6.0 = - [J-%
~ Rfo(T)dr "~ -27rSf0 (0) (40)
x
Fig. 1. The function eo(x) for x from 0 to 27r. Therefore, the average errors of both simulation
Simulation of stochasticprocesses 109
formulae over the whole region [~-1~<To~2 are equal and Therefore, the values of spectral lines
approximate to -27rSf0(0). The modified simulation
formula is preferable for the region IT[ ~ To/2Zc and the [Sfo(Wl) 4-~ Sfo(O)]A~v and [Sfo(~2) - l Sfo(O)JAoJ
original simulation formula is preferable for the region
To/21r < 17-l~T0/2. Since the accuracy of the auto- of S/(w) at 03 = wi and ~ = ~v2 do not correspond more
correlation function for [~'[~<T0/27r plays a more closely to their counterparts Sfo(~l) and S~(032).
important role than the one for [7-[ > T0/2zr, the However, in the time domain, this modification often
modified simulation formula is recommended. provides a better approximation.
Moreover, from eqns (18) and (19), it can be seen that
the temporal spectral density functions of the sample
functions f(t) and f(t) over the whole simulation time 5 N U M E R I C A L C O M P A R I S O N AND
To or their ensemble spectral density functions Sf(,;) DISCUSSION
and S/(03) are composed of discrete spectral lines at
= ~ for n = 1 , 2 , . . . , N - 1. It yields Two examples are used to compare the difference of the
rate of convergence of autocorrelation functions of the
N-I 2 simulated stochastic processes generated by the original
si( ) = Z 2-2--nnn[6(03 -~- 03n) -~- 6(03 -- OJn)] (41) formula and the modified formula. The algorithm for
n:0
generating sample functions using the F F T technique
N-1 presented in Shinozuka and Deodatis 3 is used here. The
Z Sfo(~°")Ao316(03+w")+6(w-~")] (421 algorithm reads:
n=]
si0(0)/x [6(03 + + 6(03 - 03111 The parameter a is set to one per second, i.e. a = 1 s -1.
Figures 2 and 3 show the autocorrelation function
1 Re. (7-) and the power spectral density function Sr~o(w),
6 Sfo(O)A0316(03+ 032) + 6(03- 032)]
re~s]~ectively. The upper cut-off frequency Wu of the
110 B. Hu, W. Schiehlen
1.2 10 ~
1.0
10-4
0.8
~) A
0.5 10-s
0.2
10`8
0.0
10:1o
°%.o ' o'.o ' - 5.0 -5 0
Time x Time 1:
Fig. 2. The autocorrelation functions of the stochastic Fig. 4. The absolute truncation error e~t° (r) with logarithmic
processes fl0, fl and fl. scale.
spectral density function S f , o (w) is determined from eqn and R/~ (z) are also shown in Fig. 2. It can be seen that
(2) with the admissible relative error e = 0-001. It yields the correlation function R/~ (T) is much closer to the
~u = 636.6192 rad s -1. The absolute truncation error given correlation function R A (7-). For a different
[e~0(T)I is shown in Fig. 4. It can be seen that only in the parameter, N, Table 1 shows th~ absolute errors of the
neighbourhood of 7- = 0 is the truncation error relatively correlation functions
large. The value of the spectral density function SA (w),
. . . !
and its denvatwe S]~° (w), at w = Wu are as follows:
0 ef, (T): = Rf, (T) -- R~,° (T) and
Sfl ° ( O J u ) -~- 0.7854 x 10-6 el, (T): = Rf, (T) -- R~ ° (r) (54)
and S~0 (Wu) = -0.2467 x 10-8 (53) at r = 0S and r = 1 s. It shows that for Aw > 1 rads -],
the correlation function R~ (r) is worse than R A (T). The
It turns out that these values are very small and, reason is that the error e]~(T) is approximately
compared with the admissible error eRAo(O), their proportional to moJ4 in contrast to Aw for efj(T).
contribution to the autocorrelation function RZ (T) can However, for Aw < 1 rads -1, the modified simulation
be neglected. formula is much better than the original simulation
Now, we compare the autocorrelation functions of the formula. The correlation function RA (~-) converges to the
generated stochastic processes fl(t) from the original target correlation function R~ (z) more quickly than the
simulation formula and J~(t) from the modified correlation function Rfl (r). It°appears also that the error
simulation formula. The time step At is fixed and eA (T) converges to zero linearly with parameter N.
chosen as 0.002 s, i.e. At = 0.002s. For the sampling The computational efficiency of both simulation
number N = 1661, and the simulation time To = M x formulae is shown in Fig. 6 with a logarithmic scale.
At -----8192 × 0.002s = 16.384s, Fig. 5 shows the differ- The computing time is measured as the runtime of the
ence of two sample functions of the stochastic processes corresponding F O R T R A N program in an HP-work-
fl(t) and j~(t). Their autocorrelation functions RfI(T) station Apollo 9000 series 700. The abscissa is the
0.4
S~lo(o,) t, (t)
0.3 .... fi(t)
.o
0.2 ,9.
0.1
Fig. 3. The spectral density function of the broad band Fig. 5. Two sample functions of the stochastic processes fl
stochastic process rio" and fl.
Simulation of stochastic processes 1! 1
Table 1. Comparison of the absolute errors [efl (~-)[ and [e/~(~-)[ 3 ~ • , • , ,-- ,
sampling number M remains a power of two. Figure 6 Fig. 7. The autocorrelation function of the narrow band
shows clearly that for the same variance error, the stochastic process f20.
computing program using the modified simulation
formula takes much less time than the program using and the corresponding two-sided power spectral density
the original simulation formula. For the variance error function SAo (w) given by
equal to the admissible error c = 0.001, it needs only
1 1
0.14s for the program using the modified simulation
Sf2° (~v) = 2--~ (o,r~ - ~0) 2 + 4(2J0 w2 (56)
formula, while the program using the original simula-
tion formula takes 57"8 s to run, the latter being 412 (see Figs 7 and 8). It describes the stationary response of
times slower than the former. In addition, the comput- a vibrating system with one degree of freedom excited by
ing program using the modified simulation formula also the white noise. The natural frequency and the damping
saves a lot of computer storage space. For the variance coefficient of the system are set as follows:
error equal to the admissible error e = 0"001, one needs
only to compute 4096 points F F T by the modified w 0 = l r a d s -1, if--0.1 (57)
simulation formula. However, using the original simula- The upper cut-off frequency wu of the spectral density
tion formula, one must compute over one million points function Sj5 (w) is now determined from eqn (2) with the
FFT, taking about 250 times more storage space. admissible-~elative error e = 0.0001. One obtains
The second example deals with the simulation of a
narrow band stationary stochastic process f2o(t) with ~vu = 7.5668rads -1, Sf20 (O3u) = 0"5025 x 10 -4
mean value equal to zero, autocorrelation function Rf~°
and S)2° (Wu) = -0.2703 × 10 -4 (58)
given by
e-~l~l It turns out again that for A~v < 1 rad s -1, the contribu-
RAo (~-) - 4 ~ 3 tion o f S A (Wu) and S)2 (Wu) in the sum o f e q n (22) to the
autocorre'~ation function Rfzp (r) can be neglected since it
is smaller than the admissible error eR .(0). The
[cos ( V / ~ - ~a~0"r)+ (sin ( V / 1 - (2o;0[rl)] (55) f2u_
100
Sf2o(tO)
4
~= 10
== I
tJ
1
0.1
0.1 0.01
Variance error
0.001 0.0001
oS -2 0
Frequency ,~ [l/s]
1 2
Fig. 6. Comparison of the computing time with the variance Fig. 8. The spectral density function of the narrow band
error for two simulation formulae. stochastic process f20.
112 B. Hu, I4I. Schiehlen
0,04
0.03
t;*.('=) - - %(~)
104 0.02 ..... %('0
0.01
E
104 Z. 0.~
-0.01
10~ -0.02
-0.03
10"10 -0.04 [
-40 -20 0 20 40 20 ~max 40 1; 60
Time 1; Time
Fig. 9. The absolute truncation error e~2° (r) with logarithmic Fig. 11. The error functions ee (r) and ef2 ('r) for N = 247 and
scale. To ~2204"8.
In the simulation, the time step At is also fixed and can be also seen that for IT[ ~<51.2 s, the error of the
chosen as At = 0.2 s which satisfies the inequality (49). autocorrelation function RA (7-) is smaller than the error
. . 2
For the sample number N = 124 and the simulation of autocorrelatlon function RA(7-). In addition, it turns
time To = M x At = 512 x 0-2s = 102.4s, Fig. 10 shows out once more that for 17-[~<7-max= 32"6s, the error of
the error functions of their ensemble autocorrelation the autocorrelation function Rf: (7-) is negligible.
functions Two examples show that for a given admissible
eA (7-): = RA (7-) - R~2° (r) and relative error e, the values of Sfo(~ ) and S}0(~) at the
cut-off frequency w = Wu are very small and their
e~ (7-): --- Rf2(7-) - R~2o(7-) (59) contribution to the autocorrelation function Rf(r),
just as the admissible error eRfo(O), can also be
It can be seen that for 17-["--<7-max = 16.3 s, the correlation neglected. For a small frequency step Aw < 1 rads -1
function R/~ (r) is much closer to the target correlation and a not very large time lag 7- < 1/A~ = To/27r, the
function R* !20 (r) than the correlation function Rf2(7-). modified simulation formula is preferable to the original
However, for large 7- approaching To~2, both correla- simulation formula. Since the autocorrelation function
tion functions have large errors and the correlation R~0(r) converges to the target autocorrelation function
function Rj:(7-) is worse than the correlation function (r) with order 1/N 4 instead of 1/N for the
Rf2(7-). The reason is that for large r with AwT- > 1.8, the autocorrelation function Rf(r), the modified simulation
modification in the simulation formula makes the formula has much higher computational efficiency. It
accuracy of the correlation function worse. But, if we not only saves computation time but also computer
increase the simulation time To, i.e. the sampling storage space. However, for very large r with Awlr] > 1,
number N, the errors of both autocorrelation func- both autocorrelation functions Rf(r) and R.(r) have
tions B/2(7-) and Rf:(r) for M,.<51-2s become smaller. 7
large errors. The autocorrelation functions Rf(r)
Figure I 1 shows the error functions ef2(r ) and ef2(r ) becomes worse than Rf(r) for Awl7-I > 1.8. When the
for the sampling number N = 247 and To = 204-8 s. It autocorrelation function for the range /X~lr I > 1 also
plays an important role, both simulation formulae are
0.04
not recommended.
0.03
eh(=)
0.02
REFERENCES
0.01
1. Shinozuka, M., Monte Carlo solution of structural
0.00 dynamics. Computers and Structures, 1972, 2, 855-
. . . . . . ,, :"il 874.
-0.01
2. Shinozuka, M., Digital simulation of random
" \-' i I
-0.02 processes in engineering mechanics with the aid of
F F T technique. In Stochastic Problems in
-0.03 Mechanics, ed. S. T. Ariaratnam and H. H. E.
I Leipholz. University of Waterloo Press, Waterloo,
-0.04
1;max 20 4'0 60 Canada, 1974, pp. 277-286.
Time
3. Shinozuka, M. and Deodatis, G., Simulation of
Fig. 10. T h e error functions e~ (r) a n d eA(r ) for N = 124 and stochastic processes by spectral representation.
T0 ~2102.4. Applied Mechanics Review, 1991, 44, 191-204.
Simulation of stochastic processes 113
4. Shinozuka, M. and Deodatis, G., Simulation of 6. Stoer, J., Numerische Mathematik, Springer, Berlin,
multi-dimensional Gaussian stochastic fields by 1994, p. 143.
spectral representation. Applied Mechanics Review, 7. Slotine, J.-J. E. and Li, W., Applied Nonlinear
1996, 49, 29-53. Control. Prentice-Hall, Englewood Cliffs, NJ, 1991,
5. Davis, P. J. and Rabinowitz, P., Methods of pp. 125-126.
Numerical Integration. Academic Press, New York,
1984, p. 132.