0% found this document useful (0 votes)
10 views51 pages

Dokument

This document discusses the practical computation of spectra in stochastic processes, emphasizing the importance of reliable spectral estimates in time series analysis. It outlines basic concepts in spectral estimation, procedures for computation, and the significance of parameters such as bandwidth and degrees of freedom. The document also highlights the challenges of bias and variance in spectral estimates and provides guidelines for effective analysis.

Uploaded by

Waldemar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views51 pages

Dokument

This document discusses the practical computation of spectra in stochastic processes, emphasizing the importance of reliable spectral estimates in time series analysis. It outlines basic concepts in spectral estimation, procedures for computation, and the significance of parameters such as bandwidth and degrees of freedom. The document also highlights the challenges of bias and variance in spectral estimates and provides guidelines for effective analysis.

Uploaded by

Waldemar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

-I

STOCHASTIC PROCESSES:

PRACTICAL COMPUT.ATION OP SPECTRA

BY

STIG E. SANJ

Ifltitute of Hydrodyna-"ics and Hydrau 1 ic Engineer±risĘ

LechnicaL Uniyersi ty of I)cnmrk

Builcł iny 115 DK-2Eoo Tyriby

1980

Ą
CO N TEN T S

Preface

List of symbo Ł s

1. Introductiori

2. Basic concepts in spectraL esti"ation

3. Procedure for practica1. computatioris of spectra

4. ThecreticaL definition of spectra


4.1 Transforation of the autocoyariance function
4.2 Spectra of stochotic processes

5. Sir"p1e spectrurii estimate


5.1 Tbe raw spectrurn
5.2 Mean and yariance of raw spectra

6. Smoothing procedurec

7. Distribut.ion of moothed estimators

IN,
-
8. Importance of eya]uating the baridwidth

9. Effects of window shape

10dindow c1osing" and other concepts

11.ExiiypLe from ocerin waye anatys3

12.iUisin rn inFLuence of eLectronics

13 . Conc Lwiions

Re fernces
( LIST OF SYMBOLS

a amDlitude of a sinusoid

a Fourier coefficient
n
A constant

b baridwidth

b Fourier coefficient

b standardized bandwidth
S

B(f) bias of spectral estirnator

C cross ccyariance function


nn () (1-

E{ } mean yalue

f freuency

basic fre ą uency, 1/T

lowest frecuency

rn maxirnurn frequency

f Nyquist frequency

f peak freauericy

H siariificant waye heiaht


S

H(n) cornplex arnplitude spectrum

I integra ł of w 2 (T)

M truncation point of spectral window and 1engt


• ofa subseries

n integer

N nurnber of data in a tirne senes

P nurnber of subseries

S a (f) aliased spectrum

S(f) one-dimensional waye spectrum

3
spectrum estimate
nn
smoothed spectrum estimate

t tirne

T lerigth of time senes (record)

T.1 time constant

V a.rnplitude of sinusoid
max
yar { } yaniance

w(T) lag window

W(f) spectral window

a. probabi ł ity

constant in formu ł a for equilibnium range

confidence limit a/2,

width of sDectral peak

sample interyal

basic frequency, 1/T

n(t) realization of a stochastic process

degrees of freedom

C2 yariance of coefficient a n (and b n

T time (phase lag)

x chi-squared distnibution
1. INTROD(JCTION

The theory af spectral analysis lias been deyeloped by


statisticians during the last twa decades. Blackman and Tukey
(1959) dealt with the measurement of power spectra from the
point af yiew af comrnunications engineering. Today, howeyer,
the field of application is yery wide and stili expanding. In
nearly ali the proects dealing with tirne senes the spectral
analysis lias become an ineyitable part. The reason is that the
spectrum contains much useful information presented in a con-
yenient way. Thus, it is usuaily na problem to decide wheri and
far what the spectrum shauld be caiculated. The problem is
rather how to achieye a reliable spectrum for a giyen purpose.
The suryey giyen here is mainly concerned with the latter sub-
ject, including discussioris on measures of the reliability of
the spectrai estimates.
For deterministic functions the spectrum definition fol-
lows the traditional one, and the calculations are rather sirnp-
ł e. For stochastic processes, howeyer, the definition has to be
altered, and the spectrum comutations recTuire an enhanced de-
gree af attention. Unfortunately, the latter is not always pre-
sent in practice, since yaniables indicating the uncertainties
of the spectral estimate are often disregarded; ar in other
words, the information about the quality of the estirnate is
sirnply insufficient. This is unacceptable, because far fuil
utiiization and detailed interpretation of the spectrum the
estimate obyiously need to be yery reliable. Hence, it leads
one to require that a proper presentatian of spectra af stach-
astic processes should inciude indication of confidence inter-
yais ar at least information about the basic yaniables charac-
terizing the estimates (degrees of freedorri and bandwidth)
The aboye mentioned subjects will be discussed theoretically
in later sections. Below ernphasis will be giyen to the procedure
for practic zi l computations of spectra of stochastic processes.

5
Tat is, first brief definitions of the concepts are presented
together with the pararneters of the procedure. Theri the neces-
r
sary steps wij.1 be outlined as a progra.mxners guide, while a
more profound discussion of the theory and of the irnportant
r
choices of pararneter yalues is found frorn section 4 and

E
E
E
E
E
E
E

E
E
E
E
E
r
2. BASIC CONCEPTS IN SPECTRAIJ ESTIMATION

A stationary stochastic process is corisidered. Usually,


the rnean, yariance, coyariance and the spectrum are ao1ied
for the characterizatiori of such a process. Calculations of
the rneari arid the yariance are easily accomplished, while the
treatrnent of the remaining two concepts requires more atteri-
tion. Let the time senes of length T, uhown in Fig. 2.1, be
a rea ł ization of the stationary stochastic process with mean
zero and yariance Var{rj} = rj (bar denotes tirne rnean yalue)

C
i, (t)

- „2

Fig. 2.1 A realization of a stochastic process.

It is well-known that the signal (t) can be wnitten as


a Fourier senes

= acos2nf 1 t + b si2f 1 t (2.1)

whcre f 1 = 1/T and

rT/ 2
a
ri
= Tj
I (t) cos2lTnf „t dt
1
(2.2)
J-T/2
-T/2
b = n(t) sin2nf 1 t d Ł (2.3)
-T/2
By rneans of Parseyal"s theorem the yariance of the process
can be expressed in terms of a „ b as

CO

yar(ri} = a+ b2 (2)

The process couid possess a spectrum like that of Fig. 2.2.


The area urider the spectrum equals the yariance of the orocess,

4
J- 1

Fig. 2.2 A Spectrum of a stochastic process.

and it is constant for all sDectra based on any reaiizations


(of reasonable iength) of the stationary process. That is
co

= constant (2.5)
f S(f) df = Var () =

On the other hanci the yariance of thc soectrurn, yar(S (f)),


nn
at a giyen frequency is definiteiy not constant. Hence, aon-
[
tribution S(f)•df to the total yar±ance will yary dependent
of the actual time senes (realization) . This is also reflected
in the factthat S(f) yanies considerably eyen inside a smali
C band Ę\f in each sDecific sDectrum (c.f. Fig. 2.2). The guantity
yar(S 1 (f)} will be discussed thoroughly later on since this
torm obyiously must be kopt smali, and it is important to note
that it simply is raferrad to as the yaiancc. Unfortunateiy,
it turns out t.hat whn thc yaniancc is roducod thc bias will in-
Croase anci yicc ycrsa. A compromise has to be found then. Thc
yarlanco/bias problcms can be illustratocl in the foliowing, yery
L
T
T
n

popular way. A scuadron of aircrafts has to pass an anti-


aircraft gun on a certain mission. If they pass with great
bias (i.e. exceeding the range of the gun) the yariance of
the air routes of the aircrafts rnay be smali (no danger)
Do they choose, howeyer, to pass nearer the anti-aircraft
gun, i.e. reducing the bias of the passage, it is obyious
that the yariarice of the air routes has to be increased in
order to reduce the hits. Thus, the first solution increases
the flight distance, while the second one may imply losses.
A ccrnromise might be rnade.
The sibuation is always so that the real, true spectrum
is unknown, i.e. only a limited number of realizations of
- the stochastic process is ayailable. On this basis it is our
task to guess or estimate the true spectrum as weli as pos-
sible. Hence, based on certain time senes we are only able
to accornp.lish sPectrum estirnates of the stochastic process.
The estirnates are rnarked with a in the foliowing, e.g.
S 1 (f) is an estimator for the true soectrum S (f)
nn - nn
Based on (2.4) the first raw spectrum estimate (also
cailed the sample spectrum) can be expressed as

I

S" (f) =
rri 2
(a 2 + b 2 )/f
n n
(2.6)

wtiere a b raay be calculateci yery fast by comDuter sub-


n „ n - - -

routines for Fast Fourier Transform (FFT, Cooley 1974). This


estimate is charactenized by extreme yariance, so a smoothing C
procedure has to be aplied. This is accomplished by a spec-
tral window,- which-J.s used as an influence function of S"(f)
nn
in the fre ą ucncy domaine, i.e. a windoj" which is a fixed
weigiiting figure, is moyed along the froqucncy axis acting on
cach of bhe contributions (2.6) to the spectrum. To be able
to undorstand bho rcccmrnendcd proceduro in the next section
one window rnust be rrientioned hcr, and thit is tha Bartlett
spectral window. Ib is proyed later bhat application of the
with base width of bhe order 21ti bas the greab
ad.rantage oE corrcsonciing to sDliL up the actual time senes
/

in D senes each of length M = T/p, and then ca1culat

(f) = (2.7)

As the bar denotes srnoothing, f) is a smoothed spectral


estirnator for the process. Of course it is adequate to comute
the p sectral estimates in (2.7) by the fast procedure attached
to the expression (2.6)
The descniption of an optirnal, comoutational procedure will
also cornonise the notions !9rees. of freedom, confidence inter-
yais and soectral baridwidth. These will .finally be defined. The
distribution ar a smoothed sDectral estimator is later shown T-
to be x 2 (chi-sauared distribution) . Such a distribution appears
for a senes of x 2 + x 2......+ x, where x „ 1
x
2
..... x are
1 2
indeoendent: Gaussian yariables with rnean zero and yaniance
u nit y. The,2djstnibutiissaid to haye v dearees of
freedom. [
„ freeparesenter-
y is the nurnberof lineanly independent ar
ing the expression (y= 2 for the raw_sDectruin) . In a sense, it
characterizes the arnount of information ayaiiable in the data.
The way the chi-squared distnibution is applied liere the degrees
of freedom will be a measure of thbility of the estimate. [
The distnibution is used to calculate confidence limits for the
true spectrum S (f) . For instance
rin [

Prob (A < (f)"< B} = 1-ct (2.8)

Hence, the probability that the spectrum yaniable represen-


ting the interyal between and 19 -A encioses - he true pa-
rarneter S is 1-ch The corresoonding
- interyal is said to be a
nn
conficience intcryal for S nn (f) . The interyal will enciose the
true yalue on 1OO(1-)% of occasions on ayerage.
The spoctral bandwidth b is a precise definition of the
width of a spectral window used for smoothing. Forrnulas are pre-
Sented in Section 8. The banclwith for M = 1 is called the stan-
L
dardjzed sectra1 bandwidth, b. For the Bartlett window b51.5.
For further details about the aboye, briefly discussed con-
L
CQDtS one is referred to theSections 4-12. r

C
L
AO
3. PROCEDURE FOR PRACTICAL CO1PUTATIONS OF SPECTRA

With the knowledge of the most basic pararneters attached


to spectral arialysis a computational guide will be outlined in
this section. For the actual spectrum cornoutations at least six
imoortarit conditioris haye to be obseryed:
(1) Theprectrum is expected to haye power in the
range o < f < f. To ayoid aliasing problems
(power infiltration) the sarnpling interyal
should be fixed in accordance with
1/(4f) (3.1)

For details about aliasing seeSection 12.

(II) The narrowest peak in the spectruri is estirnated


to be of the width 6. Then the quantity M should
be adjusted so the bandwidth b is of the same
size or less than 6. For the Bartlett winddow we
will find later that b = 1.5/m. Hence, M ) 1.5/6
(in general M > b 5 /6, b being the standardized
bandwidth, cf. Section 8) . The lowest freQuency
of irnoortance, f 1 , must of course not yanish,
that is, M, wich corresoorids to the length af
each subseries, has also to be larger thari 1/f 1 .
This leads to the final ineauality
M > max (1.5/6, 1/10 1 ) ( 3.2) (

Details inSections 8 and 9.

(III) The yalue of M should not be unreasonable great


since tt-ie yariance and the bias counteracts each
oter. Thus, the yarjance is

yarf(f)} =- S(f) (3.3)

whilc the bias B is oroportional to

B(f) - S
cr rr (f) (3.)

for the Bartlett window. Howeyer, it is also shown


(section 6) that iE the record lcngth is ke

A4
J.

Iw.
adequately long the bias is smali, and one rnay
therefore concentrate on the yariance. These con-
siderations make it yindicatiye to alter the in-
equality (3.2) into ari equality in the endeayour -
to keep the term M/T smali. The yariance problems
may, howeyer, be conyerted into soecifications of
the number of degrees of freedorn as shown in the
next step (and inSection 7).

(IV) The number of degrees of freedom v indicates the r


stabiiity of the spectral estirnate. Hence, a iaraer " L
V correspands to a smali yariance of the spectrum.
For a giyen record length T the nurnber of degrees -
af freedom may be calculated from
y = 2Tb/1111 (3.5)

Howeyer, it is better to specify the number of


degrees of freedom, and then determine the reQuired[
record length as

(3 E
or the assoted number of data N

N > --- (3.7)


E
266
From Fig. 7.1 it is seen that e.g. 60 degrees
of freedom aiye a 80% confidence interyal for S (f)
E
nn
of approximately t0.8 „ 1.2 i.e. a 20% [
potentiai error.

(V) The Ba-rtlett window is recomrnended because of


[
the adyantageous possibility of apolying FFT-rou-
tines to the spectral communications. In some si-
tuatioris, howeyer, the Bartlett window may produce
E
maro bias than same othar windows, but the fact
hat tha bias decreases for increasing record lengt..
T allows us to focus mare or less on the deyices fo
reducing the yariance. L
r

„12.
(VI) Aboye certain estimations of important quantitj ę
haye to be accornplished for the comoutations. -
These predictions rnight be difficu ł t in practice,:
or they may turn out to be inaccurate. In such
cases the „ window closing" technique may becorne
feasible (seeSection 10). The idea of this tech- 4.

nigue is that an initial smoothed estimate is


comouted with a wide band ą idth, and then the band-
width-is made progressiyely srnaller. The first
choice of baridwidth will usually giye a certain
amourit of inforrnation of the spectrum, and by al-
lowing the bandwidth to decrease, rnore significaL
details appear.
The iterns I-II are the main conditions that haye to be dealt with
in soectral comoutations. For each specific item detailed informa-
tion and discussion are found in se"arate, subsequent chaoters.
From the rather descripti-ye conditions aboye a real, brief program-
rners guide rnay be deriyed, yiz.
Pl. Fix the sample interyal as
< 1/(4f)

P2. Usually l/f 1 will not be the dccisiye requiremnt


for tte size of i. As the bandwidth furtherr:iore
should be in the interyal b = 5-ó the length ofC
each subseries becomes, according to (3.2)
M 2/
P3. Findthe reauired rcord length (or nber of data)
V
T- o N----
for at least y = 60-80.
P4. Apoly the FFT procedure to the p = T/M subseries
of length M, and calculae the smoothed soectral
estimate giyen by (2.7)

43
L
P5 The safst orocdure inciudes the „ window cloin"
-

technique. Usa an iriitial yalue of M like M. M/2


(b = 1.5/M.), and double the subseries tui the
bandwidth is less than the significant detaiis in
r
the spectrum, i.e. b < 5. At the point where this
is achieyed and aiso the nurnber of degrees of fre"e-
r
dom is of considerable size the optirnal spectral
estirnate is found.
A fina ł ca ł culation of the characteristics of the spectra ł esti-
rnate can now be accoznplished. It seerns sufficient to inforrn of the
degrees of freedorn (the associated confidence iriteryais) arid the

r
sectral bandwjdth. These are defined as stated below:
= 2Tb/M =3T/M
T
[x 1 „ (f) „ x 2 (f)i] 80, 95 or 99% x 1 „x 2 giyen in Fig.7.
b = 1.5/M
In this section it is of course only possible to giye the iinesE
for a feasible cornoutation of spectra. Seyeral questions are left
for discussion, yiz. if instability occurs in the estimate, what
should be done? Why cou ł d not b — O ? If only certain parts of the
E
soectrum (slope, peaks, etc.) ara of special interest, which spec-
tral window should then be chosen to minimize the bias and the ya-
riance? How are other spectral windows used in practice?
Thus, it is recornrnended to read the foliowing sections in order
to understand the procedure outlined aboye, and in order to be able
to handle difficult or rather special situations.

E
Li

E
o

Ą4
4. THEORETICAL DEFINITION OF SPECTRA

4.1 Transforrnation of the Autocoyariance Function

The traditional theoretical defiriition of the spectrwn is


CO

s (f) =1 c (T) cos2fT dT (4.1)


J -

and it is weil-kriown that the foliowing relatiori is ya ł id

C (i)
=f S (f) cos 2 r f
nn
T df (4.2)

C(T) is the :utocoyariance functionand one is reminded that]

C(0) = yar ((t)} df (4.3)


S nn

The fact that S (f) and C (T) are the Fourier transforrns af
rri rir
each other is proyed below.
A time senes, ri(t), of length T (basic frequency f 1 = l/T)
may be decoriposed into Fourier components with arrtplitudes b
as shown in Section 2. A cornplex amplitude spectrum can be de-
fined as

H (n)= -- (a - ib ) (4.4)
n 2 n n
If the expressions (2.2) arid (2.3) for b are used to_ Ę
• gether with Euler"s formu ł a (4.4lis written
f T/2
H(n) = fl(t) e
2 nf1
dt (4.5)
T/2
The original time senes is then expressed as

n f1t
(t) =H (n) e 2 (4.6)
The autocoyariance function is introduced E
fT/l
C (T) n(t) n(t+T) dt (4.7) [
nn

T/2
n f1 (t+T)
n (t)7_„H (n) e1 2 dt
- n
= -T/2
E
=
-
CO
-i rf
L
T/2

T/2
n(t) e
i2nf1
T
1 H (n) e12flf1 T }
[

= VH(n) H(n) e i2TrnflT


CO
E
C
nn(T)
= S (n) e
i 2 n iT
(4.8)
E
nn
CO

wbere the first definition of the (yariance) spectrum appears,


yiz. S (ri) H (n) H (n). Frorn (4.5) it is found that
nn n n
1.
T/2
S 2 TT n fi T
1 C (T) e
nn(n ) rn
= TIT/2 [
The forrnulas (4.8) and (4.9) are alternatiyely written
S," (n) 1 E
e i2irnf1
[

C i T 1
nn
(T )
= 1/T (4.10)
-
T/2
E
S IIn (n) T = f C
nn ()
e 2 n f1 T
dT (4.11)
E
These are noz considercd for T - co, which 1cds to
[
() 2 n fT df
C - S 1 (f) e (4.12)
nn
=f [

S nn (r)- = C e -i2fT
dT (4.13)
J (T) [
-
E

E
As C(T) = C(_T) „ the spectrum S(f) is eyen and real, and
thereby the forunulas (4.1) and (4.2) appear.
The real spectrum is S 11 (n) = H(n) H(n) = IR (n)12 aud a:"
continuous version is S (f) = S (n) T = T IH n (n)I 7for T -
nn
Using (4.5) it becomes

S
nn
(f) = Lim
1 TI2
n(t) e1 2 f
dt2
(4.14)
-T/2
In the discrete case a raw soectrum estimate, S"(f) „ (T limited)\
can be expressed as

I 2ft2 =
S (f) = -„ IVn(t e a + b2jf (4.15
2 n

O
Now, it is yery irnportant to know whether the foliowing statement
holds

S
n
W = Lim S (f) I (4.16)
T

15 the real, true spectrum the limiting yalue of the estimate


giyen by (4.15)?
For deterministic signais the conyergence of S(f) to S(f)
is srnooth in the sence that the estirnate S I (f), obtained by in-
creasing the record 1engti from T to T 1 „ would be a smootlier ver-
sion of the estirnate S(f) based on te record of length T.
CI
Hence, equation (4.16) holds.
For sto chastic rocesses, howeyer, (4.16) cannot be satisfied,
i.e. neither a mor correct spectrum (tending to the true one,
nor a srnoother version appears as the record length iricreases. As
a consequence the comprehensiye procedure outlined in Section 3
bccorrtes ncccssary. An applicable definition of the sDectrwn of
stochastic poccsses is giyon in thc subsequcnt section.
4.2 Scectra of Stochasic Processes

The basic reason why the Fourier analysis attached to the


[
formu ł a (4.15) (and thus 4.16) breaks down when applied to a
stociastic process is that it is based on the assumption of
fixed amDlitudes, freguencies and p -1ases. Further, as T increa-
r
ses, the total inforrnation contained in S(f) is distributed
oyer an increasing number of frequency bands of decreasing
width. The resuit is that it is possible to estimate the ayerage
power in narrower and riarrower frequency barids; I -ioweyer, the
efficiency of the estirnate of the powerin the narrowing band
does not improye, which implies that the yariance of the esti- [
Y
mate does not decrease (cf. Section 6).
Thus, for stochastic processes the definition (4.16) has to
be reassessed. To describe the great yariability of S(f) it
seems obyious to regard the record - T/2 < t ( T/2 as being one
of many possib ł e, i.e. as a realization of a stochastic process.
Ana ł ogous ł y, S"(f) „ C"(T) become rea ł izations of the stochastic-
yariab ł es S 1 „ 0" . The mean yalue of the stochastic sectrn L
nn na -
yariable S" is considered
nn
fT 2 Tr
E C"(T) e fT dT
nn

2
fT dT (4.17)
[
Si n ce the mean of the autocoyariance estirziator is
7T [
E C"(T) = dt = 0(z) (1-) (4.18)

it is natural to examine whether the foliowing definition is


feasibic for stocliastic processcs
[
S(f) = Lim E(S" (f)) (4.19)
ł fl
T-- nn
If t"ie record length tends to infinity in (4.17) the intega1
becornes

C() e1 2 fT dT (4.20)
CO

and, hence, by the equation (4.19) the basic relation giyen in


(4.13) is reached. The definition (4.19) is therefore applicable
for the computation of spectra of stochastic processes, and as
(4.16) is ap1ied for spectral computations of deterrninistic
signais, the fulfilment of the basic equations (4.12) and
(4.13) is achieyed in both cases.
r

fl
S. SIMPLE SPECTRUM ESTILkTES
1

5.1 The Raw Soectrum

Suopose a time senes of lengtli T has been recorded. It is


stored for cornputational tasks as a discrete senes with sample
interyal, 6, chosen in agreernent with the characten of the sig-
nal and its aplication (cf. Section 12). It has been shown
that such a record rnay be described by the Fourier senes (2.1),
and that the coefficients a n r bn in (2.2) and (2.3) can be cal-
culated by FFT routines. Thus, for any time senes ayailable in
the cornuter the Fourier coefficients may be found with a mini-
mum of efforts. Therefore, the raw spectrum (or the sample
soectrum) becomes the first sirnple estirnate in spectral ana ł y-
sis. That is,

S" (f) = 2 (a n2 - b n2 ) / f = 2 (a n2 + b n2 )
t each freauency in the Fourier decomosition a coluinn with
the height corresonding to (5.1) can be drawn, and the raw
sectrum will as a whcle apear as a steo-curye, cf. Fic. 2.2.
It is emoasized at ance, howeyer, that the naw sectru
should neyer be applied for any purpose in the present form. Re-
member that statement (4.16) does not hoid for stochastic pro-
cesses, which means that no matter how long the time senes is
the raw spectrwri will not approach thc true one. Furtheninore,
it possesses an extrerne yariance (as shown in the next section)
and that preyents a determination af true peaks etc. Fromection
3 it is also known that the raw spectrum, in a diyided form, is
anly one of the means for a reasonable spectrum comoutation. L
Te rai spectrum 15 usually discussed because it is yery
sirnolo to calculate, and because it seryes as a reference spec-
trum for the smoothcd ones as regards degrees af freeciorn, yari-
ance, etc. It has alrcady been mentioned that the number of de-
graes of freedom is twa, i.e. v = 2, while the yariance is de-
riyccl in t - a following section.
5.2 1ean and yariance of Raw Soectra

The raw spectrum is, as it is seen frorn (5.1), constituted


by a b contributions. The nature of these Fourier coeffici-
n1
ents has to be examined for the calculation of the mean and
yariance of raw spectra. Let it, for iristance, be assurned that
the process r(t) is Norrzia ł with meari zero and yariarice as in
(2.5).
Since E{n(t)} = 0, it follows frorn the usual expression for
a „ b that E{a } = E(b } = 0, and as a „ b are linear func-
n n n n fl n
tions of Normal randorn yariables, a and b are also distributed
Normally. This means that

-a 2 /2a 2
p ( an ) = e (5.2)
a v 27r
where the yariance of the coefficient a (and b ) is a. It has
n n
already been rnentioned in Section 2 that if a and b are di-
- fl n
stributed Norrnally-with mean zero and unit yariance, N(0,1),
the sum a 2 + b 2 is y 2 -distributed with 2 dearees of freedomn,
x 2. The form is

x2 (x) = I ę _X/2 (53)


2
Howeyer, a and b are not N(0,1) but N(0,) „ which mearis that
n n

2 1 -x/2o 2
X v=2(x) = e (5.4)
2a
Sorne Xi-1 dnsities are shown in Fig. 5.1.

From statistical theory (or from calculations based on (54)) it


aoncars that
E12(x)} = = 2i- (5.5)
- yar( (x) } = 2 y =4 (5 - 6)

Thc mcan yiLuc of tha spcctrurri is found directly from the defi-
nition (4.19) for T=. Thus, (5.5) bocomes
C
E(S,(f)} = S(f) = Ea + b} =
2
(5.7)
C
which giyes
[
= S(f) (5.8)
Hence, the yariance of the Fourier coefficients attached to
the frecuency f equals the contribution to the total yari-
ance (energy) at that frequency.
[
To eyaluate the yariance of the raw spectrwn the ratio
of (5.5) to (5.6) is utilized, i.e.
Var x} = ( E{ 2 H 2 (5.9)
As x2 is attached to the Fourier coefficients the yariance is
found by application of (5.1)
1. = S
yar(S" (f)} = Vara 2 + b= --.„-4 s2 (5.10)

in which both (5.9) and (5.7) haye been inserted. It is scen that
E
the raw spectrum possesses a considerable yariance, yiz. ecrual [
to s2 (f).
At last it is verv important to note that, eyen if the (t) {
rocess is not Normal, the random yariables a„ b will be yery
- nearly Normally distributed by the Central Limit Theorem.

(x)
1”
0.5v

0.4

- 0.2

Fig. 5.1 Chi-squred Probabiliy Density Functions.


6. SMOOTHING PROCEDURES

According to the preious chapters it is obyious


- thac raw sectrum caiculations based on increasing record
iengths resuit in a nearly correct mean yalue for ali
- cases but an unaltered inacceptable great yariarice. Spec-
trum estirnators that haye significant srnailer yariance
than the raw sectrum Sf(f) will be presented below. mi-
tialiy the method briefly discussed in connection with
• (2.7) is considered. Supose that instead of computing
Ti
for a sainDle of white noise (S(f) = 1). of lencth N=400,
the senes is split up irito p = 8 senes of iength N/p =
- 50 and a raw spectrum S"(f) „ j = 1, 2 .....8 is eyalu-
ated for each subseries. A smoothed spectrai estirnate,
aooears as
8
- „ (f) =
nn 8.i nn

- The resuit of the rocedure is shown in Fig. 6.1. It is eyi-


dent that the estirnate, „ (f) „ is much cioser to S (f)
nn
and the yariance is only 1/8 of the first raw estimate
S"(f) . The yaniance can, howeyer, not be greatly reduced
- without due regard to the bias, which will be discussed
- later.
- S
Generai ł y the conceDt of spectral window apPears in
- connection with the formula (4.17) for the mean yalue of
the sDectrum yaniabie S"(f) . It consists of the product of
he auocoyariancc function and a woighting figure written
- as
- 1 - !/T IT! <T
- w() = ( 6.2)
- O >T
--.--s,
UI (f
7hecreticci( spectrum,
2.0

/ I \ J\
lyl

1.0

V
I 4
I I

I
-
14
I I
I 4
I i
Y
II
II I
I

- 44

O .1 .2 .3 .4 .5 Hz

Fig. 6.1 SarrDie and smoothed soectrm for white noise


(Jenkins and Natts, 1968)

Usinc the conyoiutior. theorem (4.17) becomes

r.
1Slfl
E (f) = T S (f - f") df" (6.3)
T f" J
since the Fourier transform of w(r) is

(f) ..= „ i [s n;T E12


(6.4)

Ecjuaion (6.3)sho.•:s that thc ra".•; sectrum estimator lias


on ecctcd yaluc, .ihich corrcsnoncis to 1ooing at the
thcorctjcal sooctruni S (f) throucrh tho socctral „

nn
E (S"(E) ) corrcsponds to hayind rasscd the thcorcti
cal spectrum throuah a filbor with on „ icu1se response"
„ 4( E) . Tho tos „ spcctral windo-..i' Eor ..(E) jjj „ lacr window"

24
for w (z) were introduced by Biackrnan and Tu:ey (1959)
For large T it foliows from both (6.4) and (4.17) that
Lim E 1 S" -(f) = S „ -
i-nn J nn(f)
.5)
T-
Hence, 13 an asymtotically unbiased estimator of
. Howeyer, for a finite lenath af the record, S" (f)
tin nn
is a biased estirnator with the bias

3(f) = E { Si(f)} - S(f) (6.6)

It 13 important to note that W"(f) is of order l/T, go for


larae T it is reasonable to assume that Snn(f) 13 approxi-
mate ł y constant oyer the window width. Hence, (6.3) reduces
to ícO

T
E S" (f) S (f) T1fl I df" = S
nn (f) (6.7)
L T - _J
Thus, the bias of the unsrnoothed spectrum estimate will
always be smali, oroyided T is reasonable large.
2 The simole smooting procedure, (6.1.) is consider2d agam.
o subseries, each of length M = T/o 1 are forrned, and after
inserting these itis easily shown tat
- g ,r - 2
1T
E S" (f) = \ M S (f - f") df" (6.8)
in nn
L M f" j
The raw sactrum is then smoothed by the soectral window
r. . 12
; (f) (6.9)
L Mf J
which 13 seen in Fig. 6.2. The window is called the Bart-
lett spectral windcw. The base width of the winciow is 2/M.
By controlliric the length M of the subserias it is possib-
le to regulato the base width of tc spectral window.
In connection with the simnie rrocodurc (6.1) sand the
Fig. 6.1 it was discoyercd that by makin M smali the ya-
rianco couLi bo macic smali. Sincc this corrcsponds to makin
tho base wiLith lar, it foilo".is that a sai1 yariance can
ho obtainoci by usiriq a socctral winciow with a largo base
iic!th. Ilowoyor, a largo base width imclics smoothnq oyr
3 .iicc rancjc oE Ercc;i.icricics, i .c. thc „ impulso rospons
- /.( O 11.kr L M .)„ •i
- 4" M - lj - 2; M

Fig. 6.2 The Bartlett spectral window


-

7
7 -

Fig. 6 .3 So:c c:•:arn los of lag iirdo-is

j wic, anLi so tc bias (6.6) niay be 1acjo . The r-


suit is that ono is forcod to cornproise bct;ccn yariance
and bis. This is oxarnincd in a moLe genera ł way bolow,
whcro :,.! no scrc of tho cjrcat nxlf..!)cr of spectra1 wincio"zs
arc Drosentoci.
/

In genera ł a smoothed spectral estirnator is L


2 f T
=w() C"(T) e dT (6.10)

The lag windc"w, W:(T) „ is a function satisfying the con-


7, diticns
w(0) = 1
w(T) = w(-T) ( 6.11)
}
W(T) =O ITI > T
Same examDies of often used lag windows are siown in Fig.
6.3.Ca ł culations simi ł ar to those behind (6.8) can proye
that the Bartlett window is the only one which smoothing
effect corresDonds to constitute the rnean yalue of a
ÍA
nurnber of subseries.

.0

.3

.6

O .1 v .2..( .UI 4V .5 l ó.kf J 9 w ‚ ą


L
r.
Fig. 6.3 Soma e:amples of lag windows

The Fourier tr3nsforms of thcse lacTwindows, i.e. the


spcctrl windows (f) „ which arc siiown in Fig. 6.4, sab-
isfy thc conclitions

\
(

W (f) df = w(0) = 1

W(f) = W(-f) (6.12)


}
W() has a base width of order 2/M

1.8 M

1.

Am

6.14

3M

.2.14

- 2.14

-AM

Fig. 6.4 Somo examples of spectral windows

Te conyolution proDcrty usod on (6.10) cjiyos

„ (E) = \ W(f") S" (E - f df (6.13)

anci
E W(ft) E {St(f - E") df" (6.14)
=5
IL .;zir ;ho:n thct for Larcjor „ r, E S"() s ) „ and so
lin
CO

S (f - f1) df! = (f) (6.15)


nn - :( .nn nn

In this genera ł version S (f) is called the mean smoothed


rin
spectrum. Instead of a large T as in (6.7) and (6.15) an
S(f) wich is yery smooth oyer the range from
(f-f") 1/M could be considered. Then

(f) S(f) j W(f") df" = S(f) (6.16)

Hence, if thespectruni is sufficiently srnooth, an unbiased


estimator is obtained eyen though the spectral window has
been made wide to reduce the yariance.
In earlier literatur ę most spectrum procedures consist-
ed in smoothing the autocoyariance function, i.e. aoplica-
tion of the lag window as in (6.10). Computer technology
has, howeyer, emphasized the adyantages of smoothing in-
stead theraw spectrum by the soectral window, cf. (6.13).
the method outlined in section 3 utilizes senes of raw
sDectna, and it has partly been chosen for the quality of
be-inc the fastest one.
For mor ę exact examination of sectra1 estimators it
is necessary to calculate the order of the yariancc. If the
detai ł s are neglected, the yariance can be written

J w2 () dz = 52(f)
yafl (f) (6.17)
(

For exam1c the Bartlett window cliscusseci aboye has

(6.18)

and
/ S2(f) 2
ya r „ () (6. 1 9)
This shows tht the yariance of the sinootheci spectral estiiator
can be reduced by rnakirig M smali (large base width) as mentioned
aboye. If we write (6.17) as

yar „ W
nn V S(f" =
this ratio represents the proportional reduction of yariance as
(6.20)

a resuit of using a srnoothed estirnator, as comoared to the raw


r
spectrum estimator, cf. the yariance calculations inSection 5.2 L
and the resuit (5.10) . Suopose that M is 0.1 T, then I/T is
0.12/3 = 0.067 in the.Bartlett case. Hence, by setting M to L
10 of the record length, the yariance of the srnoothed soectral
- estimator is reduced to 6.7% of the yariace of the raw spectrum. L
An aoproximate expression for bias can be giyen on the basis

- of (6.6). For Bartlett, Tukey and Parzen windows the results are [
S(f) (6.21)

B 1S (6.22) E
nn (f)
(f)

16 M 2 df 2
1 d2 (6.23) -
B (f) S (f)
7 M df 2

Near a peakS(f) is negntiye, and so peaks will tend to be F


undresimated; and conerseiy with trougs in the case of Tukey
and Parzen windows. S(f) is smali near a peak, but large
[
when the spectrum has large siope, 50 Bartlett is best for smali
siopes.
The problerns of yariance and bias haye now been zuantified in
order to accomplish better soectral estimatcs. Sbill, confidence
limits for the spec.ra are imoortant for thc e yaluation of the
estirnate, and they haye also to be dealt with. This reauires
knOwiciGe of thc distribution oE tho estinaas

L
30
7. DISTRIBUTION OF SZ.IOOTHED ESTIMATORS

It was shown in Section 5.2 thab. the tota ł yariance could


be decomosed into a number of x 2 (2) random yariables in the
raw spectrum case. It is desirable to find the equiyalent pro-
perties for the smoothed spectral estimators. As a conseauence
of their srnaller yariance the smoothed estimators will haye many
raore degrees of freedom than the raw estirnators (2 degrees) . A
distribution 6x 2 (y) is expected (and assurned) and from stati-
stical theories 6 and v may be eyaluated frorn (cf. also the ra-
tion of (5.5) to (5.6)

y = 2 E{"(f)} 2 /yar(f)) (7.1)

6 = E("(f)/y (7.2)

Substituting the resuit of (6.17) and (6.16) in ti-ic eauations


aboye giyes the approxirnation

= . (7.3)

S (f)
6 = (7.4)
V

on the assumtion that no bias is present, i.e. B(f) = 0.


Thus the degrees of freedorn, y, depend cn the window. By
means of (6.20) and the expression (7.2) for „ Table 1 can be
set up.
Sirice the distribution of the smoothed spectral estirnator is
known it is possible to calculate the conficience limits for the
spectrum. The interyal between

\?
(1 - - 2 (7.5)

is a 100 (1 - )„ conEiccncc interyal for S(f). For a giyeri


sr)cctral wjn1ow thc dccTrecs of freedom, v, arc obtainad frorn
Tabic 1, ant Fig. 7.1 giyes the factor at (f) in (75). The
c::amr)Lc of thc smoothcd estimate in connection with (6.20) was


r
Variance Deerees Staniardizcd

DcscriprJon Spectra! wrndow


ratio
1/T
of
freedom
bandwidth
b
f
rectancular 2f
sin
2fJ
2M
T
0.5 T
BarUctt
sm-f.kf
( f[ )
0.667
f
3-
T
Al
1.5 T
Tukey Al
sm 2fA[
X
1
0.75 2.667 T 1.333
[

/sin (7rfA!!2)
Parzcn - . I 0.539 3.71 1.86
rfAt/2

Table 1 (Jenkins and Watts, 1968) . E


the Bartlett window-with M = 0.1 T, i.e. p = T/M = 10. From
Tab ł e 1 it follows that y = 310 = 30 degrees af freedom. Sa E
the 95 canfidence limits for the specrurn S are accord-
nn (f)
ing ta Fig. 7.1 {
0.6 1.8 „„
nn (f) n n (f) (7.6)

For comDarisan it can be mentioned that the raw sDectrum wau ł d


[

giye tie 95 limits


0.3 S" {
n n (f) 0 5 " (f)
nn
(7.7)

which arc consiclerably wider because af thc srna ł J.cr degrees af


freedam associatod with the ostimate. Thc larger the number af
ciegroas af freociom, thc marc stab ł a is tha estimatar in the
scnsc tat i ts yariancc is smaLi. [

E
C
T
L

P
L

L
I0
9

7
6
_LILL__L:rIH 5.

2..5

1 (
ao
t.5

xF1
IQ
QC)

fl S

0.6

0.5

0.3

E"EL 0.)

O :5

0.2

0.15

1 4 b 1 - 9 IV 15 0 .5 MS U 50 i.) () ) „O k)
degrees of freedom y

Fi. 7.9 CorEiancc Li:iis.

33
8. IMPORTANCE OF EVALUATING THE BANDWIDTH

One of the useful characteristics of a sDectral window has


beeri shown to be I (defined in (6.17), (6.18)) „ since I/T pro-
yides a measure of the reduction in yariance of the estirnator
due to smoothing by the spectral window. A further useful cha-
racteristic of a window is its width. It will be shown ł ater
that the width of a spectral window rnust be of the same order
as the width of the reak in the sDectrum. Since the spectrai
[
window is non-zero for most frequencies in the range -f(,
it is necessary to define more precisely the notion „ width" of
[
a sDectral window. The width or bandwidth is often defined as
the widbh of a rectan;ular window, which giyes the same yaraiance.
Thus, (frorn (6.17))
S2 (f) 2

f CO 2
- co

Hence, the bandwidth is b = i/i. it is sometimes conyenierit to


[
define the standardized bandwidth b 3 corresponding bo M = 1, so
that b = b/M. The standardized bandwidt"n for the windows ear-
her mentioned are shown in Table 1, too. Frorn (8.1) it follows
that the yariance of the spectral window is inyersely pr000r-
tional to the bandwidth. In fact, it is secn that

Varjance x Bandwidth = Constant (8.2)

Furthermore, (7.3) shows bhat the numbcr of degroes of froedom


y, of the srnoothed es.timator is
= 2T 2T b
5 - (8.3)
[
Ecxuations (8.2) and (6.3) say bhat a larQe banchiidth imDlies that
bhe numbur of dcjrces of freedom is large and the yariance is
[
sall. Conycrscly, a smali bandwidth implios few dcc;rces of frce-
dom and lir:!ncc larac yarianca. Smali bandwi"ibh is „ howcyor,( with
small bias. -

E
r
L
34
r (

In order to see the effect of choice of bandwidth it is ne-


cessary to use a process with known spectrum. For exarnple, a
second-order autoregressiye process with the spectrum, S/ a Z,
shown in Fig. 8.1 (solid line) may be used. Also shown are the
smoothed spectral estimates, Io, based on a realization of
N = 50 data of the process using the Parzen window. For M = 8,
a smooth estirnate is obtained, but with no indication of a peak,
and the bias effect discussed in connection with (6.23) is
cieariy seen. M = 24 produces a fiat peak near the position of
the true one. As M is increased to 40, nurnerous smali peaks ap-
pear due to the increase in yariance of the estimate. Note tha
the spectral density has been plotted on a iogarithruic scale,
- because the confidence limits will then be the same for ali fre-
quencies. As the bandwidth is constant with frecuency, the fre-
quency scale is linear.
The rather erratic resuls of Fig. 8.1 and the large confi-
dence interyals cali for calculation of sectral estimates based
on a larger nurnber of data. Fig. 8.2 shows the same process but
with N = 400. When M = 48, the estimate is cioser to the true
spectrum than any of the estimates based on N = 50 data, but
the imDroyerncnt is not so great as might be exected. Since the
confidence limits are rather narrow it wouid probably be acceted
that the peak is real, eyen though it is much narrower than th ę
theoretical peak.

35
8OVo confidence in Ł eryot
2 - M 1.0 21. 8

J
I I I

2- Ii
I I
f
\ I I
I

\\\
ł
I
-

PARZEN WINOOW
II\

M bandwidth
0. 4 1.0------
21.--- I I
I I
8- II
II
I\
0.2 - -

1.1

0.1 . I
.-f
0• .125 .25 .375 .5 Hz

- J
r
L C1 /
(
S -fl(f) 2
(

\\ 80 °/o confidence ineryos


\ MLB 3216
\\
2
- 4
\\\
\
1

PARZEN WINOOW
HE
M bandwidth
LB ----
- 32----

:: 16

•0 0.125 .25 .375 .5 Hz

Çk
Fig. 8.2 Estirnates for Second-oraor
Autcrogossiyc Proccss, N = 400
• (Jcnkins and 1966)

3.F
I.

9. EFFECTS OF WINDOW SHAPE

The statistical literature comprises numerous marc or less


sophisticated spectral windows. Some haye been discussed aboye,
and the form of the lag windows was shown in Fig. 6.3. For rea-
Sons of comparison (and for special applications) the formulas
for six spectrai windows are giyen below. The simplest one is
the rectangular windwo which is

W(f) = 2M sm (9.1)
27, f M
It is sometimes called the „ do-nothing"t window, because it giyes
the effects that correspond to a spectrum with a smoothing of
nearly no yalue. It is therefore eyident that the rectangular
window neyer shouid be applied. The Barlett window is
2
(f) = M (: (9.2)
)
and it has earlier been discussed. The Tukey spectrai window is

W(f) = M (sin.fI2 1
(9.3)
\ 2rfM / \1-(2fM)2/
The Parzen lag window is of a rather comolicated nature, but
the spectral window is on the simple form
I
-- 3 (
sm fM/2
fM/2
These windows haye ali been presented in Fig. 6.4. Howeyer, to
shaw the great selection of windows a couole rnore will be men-
tioned here. The „ hannind" window (after Julius von Hann) seems
to be identical with the Tukey lag winc3ow. \ slightly altered
form of thc ś a is to „ hamming" wirdow, (after R.1. Hau"..ning)
(fl 21(1.OS_O.1G(2EM)7)
W() = .i (95)
\ 2rf.i \ 1- (2ft ł )
)

Firially, R.[3. Blackm -in bas craatccl thc foliowing spcctral window

= i (n 2f:.(O.84+O.16(2f:.1) + 0.08(1)2
(9.6)
\ 2:1 fM / \ 1 - (2 (E I) -1 /
The most cornion windows are those of Bartlett, Tukey and
Parzen. Therefore t"ne qua ł ities of these are cornpared. For a
fi:ed M the spectrum for a giyen process could be calculated
usirig different windows. Then the bias properties corresponding
to (6.21), (6.22) and (6.23) would apoear, i.e. Bartlett pro-
duces smali bias near the peak, but large bias wheri the soectrun.
l-ias large siope. Tukey and Parzeri windows produce smali bias
where the spectrum is linear, and relatiyely large bias near a
peak. On the w ń ole, the Tukey window has the smallest bias for
a giyen M.
Concerning the yariance, a
comparison between the windows
mentioned aboye was made in
40
Table 1. For a giyen, fixed M
one reads that the Parzen 20 Tukey M: 8
Pcrzen M :12
window presents the smailest Tukey 1 -1 :32
10 Pcrzen M :1.5 .... .
yarance. Howeyer, it is corn-
pietely misleading -to choose
the spectral window on tne ba- „.
sis of isolated considerations 2.0

of bias and yariance. If the 1•

windc;s are comcared with equai 1.0 I


bandwidtis, the smoothed sectra
are almost identical with re- 0.-

spect to shape and yariance. The


- 0.2-
reason is the imDortant eauation
- (8.2), which says that yariance
O .25 •7 .5
x bandidt = contant. Flence,
twa estimatos hayo the same yari-
ance if their band.iidths arc
cqual. For instance comDare Par- Fig. 9.1
zen and Tukcy windows. From Ecui-bandwidth comparingusin
Table 1 it aprears that the a first-ordcr autoregressiye
banci.zLclth of thc Par:cri window proccss, N = 100 (Jenkins and
iS 1. - timos af Tukcy. atts, 1963)
Hence, a Tukey window with M = M 0 has the same bandwidth and
r
yariance as a Parzen window with M = 1.4 M . Since both the
yar±ance and bias are approximately equal when the bandwidths
are eaual, it foilows that the estimates of the spectrum ob-
tained using equal bandwidths s"nould be yery sii1ar. Fig. 9.1 .L
shows two ecjui-bandwidth comparisons for the Tukey and Parzen
windows for a first-order autoregressiye process. It demonstrates[
that Tukey, M = 8, and Parzen, M = 1.4 . 8 12, are ciuite simi-
lar, and the sarie for Tukey, M = 32, and Parzen, M = 1.4345.
The agreernent is so ciosa that it can safely be conciuded that
r
-

- there is no reason to prefer one window rather than the other.


Hance, frorn ernirica1 results the following statement is obtairied

-
Choice of bandwidth is important, (9.7)
not the choice of window
L
As it was eiahasizedaboye the sectra in Fig. 9.1 are only
similar if eaual bandwidts imply an aproximate eaua ł ity of ya- {
riance and bias of the esitmates. Frorn (8.2) it aopears tha ":the
•1
yariances will aiways be concordant. Howeyer, if windows other
[
than the Parzen and Tukey in Fig. 9.1 wara comoared there could
be differences in the bias roperties. This could, exceotionailyj
state the raason for not choosing the Bartlatt window as recom-
mended in Saction 3; if one namely should be specially interested
in a minimum of bias of certain parbs of the spectrum with, for
instance, larga siopes. It must, howeyer, not be forgotten that
tha bias will aiways be smali whcn thc record length, T, is
larga.
L
Shoul ć it, for ona reason or another, be imnossibla to obtain[
a sufficicnt racord lcngth than tha spectrum contoutation will not
be as ;Lrnnlc as in thc flartlatt cac. Thc most raasonable proce- [
durc in thnt situation inciudas the forrnuia (6.13). A raw spec-
tru 11 ,:Is to be calculated at first and inserted as S (f) . Then
for oach frrucncy E thc smoothaci estimate is found as the inte- L
gral in (G. 13) of thc spec tra ł window in CuCstion and tha raw
spectrum. The rather complicated form of the spectral windows
(c-f. Fig. 6.4 and the forirtulas giyen aboye) should not be con-
fused with the simple lag windows (triangle, cosine, etc.)
applied to the autocoyariance functins.

li


J.
Ik
10. „ WINDOW CLOSING" AND OTRER CONCEPTS

The idea of the „ window closing" technique is that one


starts cornputing srnoothed spectral estirnates with a wide
bandwidth and then uses progressiyely srnaller bandwidths.
The initial choice of bandwidth will usually giye a certain
amount of inforrnation of the spectrum, and by aliowing the
bandwidth to become srnal ł er, more signiicant details can
be explored.
It was started in section 3 that the width of the win-
7 dow must be of the same order as the width of the narrowest
1_ important detail in the spectrum. Hence, the tirne to stop
is when the bandwidth is less than the smallest significant
detail in the spectrum. Hcweyer, practical problems of inter-
pretatiori can arise due to instability of the estirnites. Thus
a certain arnount of caution is reuired in interpreting Spec-
tra ł estirnates. This leads to say that the analysis is of
little ya ł ue unless

The spectrum has to make sense physically

As the bandwidth b = b 5 /M a decreasing b imolies that M


(length of a subseries in seconds) increases. A reasonable
large M ai-id at tł e same time a sufficient great nuinber of de-
-
grees of freedom proyide the guides for an optimal spectral
estimate (i.e. the right time to stop the „ window closing")
Therefore it is irnoortant to calculate the confidenca limits
/

(from ) associated to each of the estimates in the procedure.


Exarnples of aoplicatiori of this method frorn ocean waye ana-
lyses are giyen in section
(In the literature seyeral ather notions in connection
with scctra1 estimation are met). Only twa will be referred
to herc. From equation (6.6) one reads that if the bias is
smali the srnoothcd spectrum estimata, (f) „ is close to the
truc spectrum, s(f) . If that is so for all frequencies,

42
theri the estimate is said to reproduce S(f) with high fide-
lity. Eauation (6.17) is connected with another concept, narne-
ly high stability, which is said to be present if the yariance
is smali for ali frequencies. As these two concepts are based
on respectiyely bias and yariance, it is ciear that the re-
quirements of higi fidelity and high stability conflict.

43
11. EXŹ\MPLE FROM OCAN WAVE ANALYSIS

The objectiye of this section is to deterrnine the waye


spectrum from rneasurerrients in the Baltic Sea. The sample
interyal was fixed at 6 = 0.25 s and the instrument tirne
constant at T. = 0.1 s. In a situation with a sianificant
waye height H 5 = 2.4 m a record af length T = 2048 s (about
half an hour) was taken. From sirnilar waye spectra the nar-
rowest peak rnight be estimated to be of the width 6 = 210 2
Z /

7 - 6.10 2 Hz. Hence, item P2 in section giyes an M of about


60 s and frorn P3 the required record length T becomes at
1 .

least 1750 s, with a desired v of about 60. The actual record


of length 2048 s ±5 therefore suffic±ent. It is assurned here,
howeyer, that the estirnation of 6 is rather inaccurate, and
that leeds to a demonstration of the „ wiridow closing" technique.
The yalues found aboye giyes in agreernent with P5 an initi-
al M of 32 s (which is also conyen±ent for the FFT program,
i.e. 32 s 128 data ~ 2 data for the FFT) . In that case the
bandwidth becomes b = 1.5/M = 4.7 10 2 Hz. Fi. 11.1 shows
this initial spectrum and the Figs. 11.2 and 11.3 are estima-
tes with successiyely doubled M yalues (i.e. halyed bandwidths)
The confidence limits are, in each spectrum, plottet around
sorne of the spect:al yalues (the scale is not logarithmic so
the limits are not constant) .
_-The interyals are always wider near the peaks, cf. the pro-
port±onality of yar±ance and sectra1 enery. Note that the con-
fidence lim±ts are always giyen on the assumption of no bias,
cf. (7.1) -.. (7.5) .Ficj. 11.1 has a large nwn.ber of degrees of
freedom, and the spectrum is yery smooth because of the rela-
tiyely large bandwidth. Hence, the bias will also be of con-
sidorable yalue, wbich imlies the underestirnation of the peak
as comoared to the Figs. 11.2 and 11.3. Application of ha ł y
the band.zith, in Fig. 11.2, allows details to apDear, and
the derces of freedom is sti11reasonab1e size. Note that the
peak yaluc has jncreasecl to about 4 ms. As B b, cf. (6.21),

44
UL U4 0.6 0.8 ?-ł z

Fig. 11.1 Initia ł estirnate in „ window closing" procedure, M = 32 s

m 2 sjS

:1
3

0
O 02 0.4. 06 08 H

Fig. 11.2 Estrnato wih M = 64 S.

45
• 12. ALI2\SING Ł ND THE INFLUENCE OF ELECTRONICS

The phenornenon a ł iasing can appear when a senes of con-


tinhous data is sarnpled with interyals of_ec, in order to
obtain discrete data for comuter ooerations. If the sarnoled
„ •... „--•••- - -

• •„• ya1uecou1d, pou1ar1y speaking, either represent law or


/ • 1 •„

-r
high reuencies ni the original data senes. This is u ł us-
trated in the figs. 12.1 and 12.2.

Fig. 12.1 Sam1ing yalues representing a high ar a law


freuency

Aliasing does of course not occur in the ana1oue data, and


therefore the san1e interya1shou1d be chosen with care
to maintain the yalidity af the data when these are conyerted
to a discrete record. [

fN 3 fN 5f 7f

Fig. 12.2 Aliasing

The term 1/ (2 1) Hz is called the Nyauist freauency f.


The an1icablo 'Ircquencv rango for a seniesof discrcte data
[
is then 1/T to f N" whcre T is the length of the record. The
aliasir-ig problcrns apcar if froquencies higher khan f are
prosont in thc senes. In that case thc freauericies f >
will bo folcied into the lower rango frani l/T to f and confused

with tic cncrgy thcro. For a cortain f in thc rango l/T( () N


the higher freciuoncies which aro aliased with f aro found as

L
46
(2 f ± JE„ f) • (2n .LN ± Tf) „ ar as shown in Fig. [4
12.2. This is yerified in the foliowing way:
t=O, 6, 2, 3 6,....
and (

t=PI2FNS)
„12N
L.

- 1T f• TrfN±f) p
cos 2 r.:t = cos = cos (2n (12.1)

Thus, ali data at frequencies 2 n f ± f haye the same cosine


function as data at frequency f, when they are sampled at
paints 17(2 apart.

The waye energy spectrum in fig. 12.3is an exarnple where


= 17 (4 f) „ f being the peak frequency. The Nyquist fre-
quency is in that case f = 2 f. The aliased oower is shown
C
or a situation where the energy at f > 2 = 4 f is zero
(normaily a reasonabie assumption for waye spectra)
From the examples and the theory aboye it is eyident that
to ayoid aliasing, 6 must be chosen so smali that no power
exists aboye In genera1 it is recomrriendable to select
two ar three times larger than the maximum frequency f exect-
• •1
ed in the tirne senes. A reasonable samDie interyal is then
17(4 fm) . Aliasing is, by the way, a weii-known phenorn-
enon in rnoyie films, where the wheels af a stage coach apear
to rotate in the wrong direction.
If one should be farced to deal with a sDectrum like that
of Fig. 12.3, tne real spectrum may be reconstructed by rneans
of Piiilips” (1966) ecuilibrium range. He showed that for
f > f r)the soectrurrL.yields

f 5
a2
S (f) = (12.2)
„ •l „? (2")
?.sthe enercjy is daubled at f = f = 2 f in the actuai example,
.„ ccn be eyaluatcd from
S rTr(f‚)
•CT -
-2 S a (f N) = f, (12.3)
(2 -, T)
whorc 5(f) is the recorcied,aliased spectrum. When et " is found
thc foruLa (12.2) can be aDclied for esimation af the éliased
m1s
(

200

O 1 2 3 1 S 6 7 B 9 10 II 12 13 14 „5
FPEQUENCY S"

50 20 166 1L3 125 III 0 56 T


PERIOD

zI
Fig. 12.3 P-M spectrum with aliased po,;er, L= 1/4 f

frequency rance and for recoristruction of the spectrum.


In order to achiye a reliable spcctral estimate it is also
important to consider the electronics through which the actua ł
data collection are performed. For ocean waye rneasurements,
for instance, the sim1est eauipment comorises a bw-pass cir-
cuit, i.e. an e1ctrica1 system with time constant T. (resistan-
cc multiplied with capacitance) . It is of interest to study the
output from such a system for a sinusoida ł input,.e.g. fre-
qucricy f and amplitudc V Thc Figs. 12.4 and 12.5 show how
thc arn;iitudc is attcnuated dcoencient of the time constant T.,
and it is also shown how the phase ancjlc changos.

;
Vma x

Vmoz /\f

Tf

0.1 1 10

Fig. 12.4 Output amDlitude for a sinusoidal inut

Ti f
-L.

-9o, t
7, Fic. 12.5 Outut phase angie (f)

These ccnsiderations are baseci on a yery sirnple syst,


but eyeri though the measuring eQuiments in practice are much
more comp1icted the principles aboye are as a whole yalid.
The exact resDonse function is usually not ayai ł able, but
often the time constant is instead yariable. Therefore the
7- anly way to achiye good resuJ.ts is by adusting T i in agree-
rnent with f Ą is fixed,
M. and i. When the sampling intoryal
it is recomincnded to obscrye the foliowing conditions:
(i) T 1 < 6 is necessary for a proper sampling without know-
lodga of the resronse functicn. It it usually
faasible to sor. T.
(ii) T. is mcanincTless.
13. CONCLUSIONS

A nurnber af condjtjons has to be obseryed for a feasible


corputation of spectra of stochastic processes. it is fur -
ther complicated by the ayailablity of nwnerous spectral
windows. Therefore it has been attempted, herein, with due
regard to the feasibi1ity (comDuter time etc.) to recomrnend
one procedure, and to expiairi the choicB.
The initial selection of the instrument tirne constant T.
and thereby the sample interyal 6 should be made already in
the planning phase. According to section 12 it is reasonable
to ix
1/(4 f m) and T.J.
In section 8 and 9 it is shown that
yariance x bandwidth = constant
and that a. sufficient large record iength T keeps the bias
smali. This leeds to the preference of the Bartlett, window
and thereby to the procedure outiined in section 2
it is emDhasized that an indication of the confidence limits
(or the nuber of degrees of freedom) and the bandwidth
should always be inciuded in the presentation of a spectrum
of a stochastic process.

50
W

REFERENCES

- Bendat, J.S. and Piersol, A.G. (1966) Measurernent and analy-


sis of randorn data. John Wiley & Sons, Inc., New York.
Blackrnan, R.B. and Tukey, J.W. (1959) The measurement of
power spectra from the point of wiew of communications
engineering. Doyer Pubi., New York.
Cooley, J.W. (1974) The Fast Fourier Transforrn a ł gorithrn arid
its application. Inst. Numerical Analysis, Tech. Uniy.
J Denmark, (Lecture notes, unpublished)
Enochson, L.D. and Otnes, R.K. (1968) Prograrnrning and ana ł y-
sis for digital time senes data. Shock and yibnation
Inforrnation Center, U.S. Dept. of Defense, Washington,D.C.
Jenkins, G.M. and Watts, D.G. (1968) Spectral analysis -by use-
of the Fast Fourier Transforrn. Phys. Dept., Danish Atornic
Energy Comm., Risc.
Knistensen, L. and Poulsen, C.A. (1970) Digital spectral ana-
lysis by use of the Fast Fourier Transforrn. Plys. Dept.,
J Danish Atornic Energy Comm., Ris.
Milirnan, J. and Taub, H. (1965) Pulse, digital and switching
wayeforms. McGraw-Hill.
J
P.i11ips, O.N. (1966) The dynamics of the upDer ocean. Cara-
bridge Uniy. Press.
Rye, H. (1977) The stability of same currently used waye pa-
rameters. Coastal Engrg., 1, pc. 17-30.
Seiangr, K.A. (1976) An eyaluation of different methods for
computation of spectra. (In Norwegian) „ Riyer and Harbour
Lab., Narw. Inst. Tech., Trondheim.

51

You might also like