ao—a060 235 navy underwater sound lab new london …

15
r irz AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDO N CONN FIG 12/1 AUTOCORRELATION AND POWER SPECTRUM ANALYSIS.CU) APR 65 8 C HASSELL UNCLASSIFIED 1J5L TM 913—52—65 Pt END DDC

Upload: others

Post on 28-Apr-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

rirzAO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON CONN FIG 12/1

AUTOCORRELATION AND POWER SPECTRUM ANALYSIS .CU )APR 65 8 C HASSELL

UNCLASSIFIED 1J5L TM 913—52—65 Pt

END

DDC

Page 2: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

M~j ’~: P TJeetcon /

U. S. NAVY UNDERWATER SOUND LABORATORY

-.

FORT TRUMBULL, NEW LONDON, CONNECTICUT

AUTOCORREIATION AND POWER SPECTRUM AN~LYSI8 i-

— by t~ L Problem 10.

~lf) I BeverlY C./ Hassell 1-055-00-00 :

T: -

USL Technical Memorandum No. 913-52-65 -

c~f1~cS

( ‘? I~~~l April 1965 ~- ‘

T - ) ‘ )f~

I NTR~I)UCTION

A Fortran program 4esignated as t$L Program No. 0293 has been .~~~ written by the Digital Computing Branch for the purpose of carrying out

a generalized harmonic analysis of a digitized time function. Thisanalysis procedure , as well as the program it self , will, be desc ribed inthis memorandum.

— ~~~

_

~, — / —‘ f f ~ ~~~~ i / -~~~~

ANALYSIS

A Fourier transform pai r relationship exists between the autocova riancefunction and the power spectral density of a stationary random processx(t). Using this association a method for obtainin g an estimate of the

~~~ power spectrum of the process by transforming the autocovari ance functionhas been developed by Blackman and Tukey. 1 Basically this analysis consists

U_i of first calculating the normalized autocova riance function

r (T) = x’(t) x ’ (t+T) (1)

of the sampd.e function x’(t ) and modifying this function using the HanDninglag window . x ’(t) is only one member of the ensemble of function s thatmake up the random process x(t) . Consequently it ii only possible toobtain estimates of the power spectral density of the random processby performing a. Fourier tran sformation of this modified correlation function.

2. R. B. Blackman and J. W. Tukey , “The Measurement of Power Spectra-~~~~~~ from the Point of View of Communications Engineering” , 1958

2 Other such windows are &iscussed but the Hanm%ing window is used inthe prog ram described by this memorandum.

Jr ~~~~~ r~~~~~- -~~, /~I I —

p. \‘‘ -~-------—~~i:~~~~~~~~~~~~~~~~~~~~~~~~~~~~ En cl __

~~~__ t~ ~~~~~~~ Z~r

Page 3: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

USL Tech Memo -

913—5 2—6 5

Since x’(t) is only available for a finite time T, r(T) can onlybe calculated for /T/ = 0, .. . , Tm, where Tm is the maximum lagtime, and is not defined outside this region. The Fourier transformof r(T) is given by

S ( f ) = f r ( T ) e _i~~T dT

(2)

In order to carry out this integration, r(T) must be defined for allT in (~.oo~ a.~~). By considering r’iT) as a product of r(T) with aweighting function or lag window W(T) where

~ 1 T~ T ,~

ir (T) = (3)

otherwise

r ’ (T ) is defined for all T and its Fourier transfo rm may be calculated.Since multiplication in the time domain corresponds to convolution inthe frequency domain, the re8ulting estimated power spectrum is given by

P(f) = s(r)~~ w(r ) (ii)

where s(r) is defined by eq. (2) and

s1tI w IW ( f ) = f w(T) e

_~~ T dT 2 T ~= (5)

w(r) has very undesirable minor lobes which contribute errors to thepower spectral density estimates. For this reason other weightingfunctions have been examined and are described in footnote (1). Thepart icular lag window being used in Program No. 0293 is the Hammingwindow given by

.54 + .4 6 co. 1’ ~ T m

= m (6)

‘0 lT~ > T m

2

Page 4: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

USL Tech ~.teato913-52-65

A comparison of h(T) and v(T) is shown in Figure 1. The Hammingwindow was chosen because it has the property that its Fouriertransform

u(r ) = •51~ w ( f ) + .23W(f + J_.) +.23W (t- 1 ) (7)

has minor lobes that are no more than 2 per cent of the height ofthe major lobe, a vast improvement over W(f) which has side lobesas high as 20 per cent of the major lobe. These differences areillustrated in Figure 2. In addition to this important propertythe Hamming window is easy to work with coinputationally.

Once having selected a weighting function, power spectral densityestimates are obtained by performing a Fourier transformation on theproduct r(T) . h(T). Since both functions are even, a cosinetransformation is all that Is required.

In practice, and in this program, continuous data is not availablebut instead discrete values of the sample function x’(t) at equalincrements At are available for analysis. In this situation, calculationsare simplified by the following approach. First form mean laggedproducts r(Tp) p = 0, 1, ... in, (the discrete analog of r(T)) whereTm = mAt Next perform a finite cosine seriee transform usingthese in + 1 correlation coefficients giving raw estimates of thepower spectral densityEL(p). These estimates are taken equallyspaced at p = l/2Thi = l/2mAt . These raw estimates correspond tousing the rectangular weighting function w(T) described in the continuouscase. Just as a modification was required in the continuous caseto reduce the errors imposed by the large minor lobes of W(f), so toosmoothed estimates of the power spectral density must be calculatedin the discrete case. The only major difference being that in theprevious case the modification was carried out before transformingin order to avoid convolution in the frequency domain. With discretesamples, however, computations are easily carried out in the frequencydomain. Since the two functions being convolved are just impulses atequal spacings convolution results in another set of impulses. Morespecifically for each raw estimate EL(p) convolution results insmooth ed estimates Sp where

(8)= .23 EL(p-l) i- .5l4 EL(p) + .23 EL(p+1 )

3

Page 5: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

USL Tech Memo913-52-65

RESOLUTION AND STABILITY

Using the method outlined , estimates of the power spectraldensity are obtained every 1 cpa. These estimates are considered

2Tmto be an average over frequency of the power in the band l/2Tm cpa.As seen in equation 8, and in Figure 2, adjacent estimates are notindependent so the resolution is taken as

2’ 1 = 1 cpa.

~~2Tm~~~) Tm

The stability of these estimates is related to the number ofdegrees of freedom associated with each estimate. If the true spectrumis relatively smooth, degrees of freedom may be approximated by

K~~~’ 2T’ (9)Tin

where P’ = T - 1/3 Tnt.2 2

Call the estimates of the power spectral density S and le~ abe t~e true power spectral density. The random variable ICS2/~ hasa2 X’ distribution with K degrees of freetiom. Using the table o~

X values, it is possible to calculate confidence limits for a thetrue power spectral density. The 90% confidence limits are given by

2 2 2_ _ d KS

2 wherex2 xl

2 2 2 2 2 2and are such that P(x � X1 ) = .95 and ~(x � x2 ) — .05

For example, if K = 25 degrees of freedom, then 90% of the2time ~he 2true estimate a2 will fall in the interval given by .66s � a- ~ 1.718

Since the length of the sample function x ’(t) Is limited to Tseconds arid stability is dependent upon keeping the ratio T/Tm large,a compromise is always necessary between stability and resolution.As Tm increases, so does the resolution, but the stability orconfidence in the estimates of the power spectrum decreases. For afixed T, a value of Tin will, be determined for each analysis to givethe required resolution with the accuracy needed, however, a rule ofthumb is that Tm should never be greater than 5 or 10 per cent of Tthus always allowing at least 20 degrees of freedom for each estimate.

4

Page 6: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

USL Tech Memo913-52-65

Suppose it is desired to analyze frequencies from 0 to some

~‘max Cp8 . If the true spectrum is zero outBide then a sampling

rate of At = 1 is sufficient. However , if the data is~~~~~

filtered and the frequency response of the filter drops off graduallyoutside

~max then perhaps a sampling rate of At — 1 should be3~~max

used to guard against the effect of aliasing of frequencies above

Suppose a resolution of 1 cps is desired and additionally the accuracyof 50 degrees of freedom is sufficient, then

K 2T’ 50 and 1 1 cpa (11)Tin TinTherefore Tm = 1 second and T’ = 25 seconds and T~~~25 seconds.This means that if , for example, f = 100 cps and At — 1 , then

max7500 samples would be required. A summary of these calculationsis shown in Figure 3 for both the general case and a specific example.

DESCRIPTION OF THE PROGRAM

The program is written to accept both gapless (Datrac) and binarycoded decimal (BOB ) tape input . Sense switch 2 governs the mode of’the .rput. A maximum sample of 10,000 word s can be handled. Avariable format for BOB data permits the input to be in any formthat is specified on the input format card . The mean and standarddeviation are first calculated according to the following standardequations:

mean -~ X B A R 1 (12 )

Standard deviation = SIG X 1 = [i (~

X~ — N ~ (13)

and printed out. It should be noted that the program does notmormalize the data to have a zero mean . This cannot be done becauseof storage limitations and must be done prior to input to thisprogram. USL Program No. 044k may be used to normalize BOB data.

Correlation coefficients as a function of lag are computed

5

Page 7: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

~~ L Tech Memo913-52-65

according to one of the following formulas as determined by senseswitch L~:

N-p N-p N-p

(N-p) ~~~~X1

X1,~~ ~~~~~~~~ ~~2 X 11=1 1=1 i=]. ( 1)

R~p1 N-p N-p 2 N-p N-p 2 1/2

~~ x~ (~~~x) ] .[(N_P)Exl~~

- (~

x~+~)

]~i=l i l i i i i

N X1 X1,~~ -E ~~~1=]. 1=1 (15 )

— _ _ _ _ _

[N ~

x~2 - (E x~

)

2

]. [N ~~~ ~~~ (E x . )

2

]( 1/’2

i=l i=1 1=1 1=1where p = 0, 1 ... in and m is the maximum lag. ~ r equat i on 1L~ thenumber of data points used to calculate the correlation coefficientsmust decrease as L increases. In order to use equation 15, the numberof points N, used to calculate R(p), remains fixed but the sample sizeread into the computer must be greater than or equal to N+L. Thedifference between these equations should be small because N willbe large compared with m. Sense switch 1 will give a printed outputof R(p) and also output on a plotter tape.

Raw estimates of the power spectrum EL (p) are calculated by usinga subroutine called Forer. These estimates are the result of a Fouriercosine transformation of the function R(p), and are given by

m-lEL(p) = 1+2 ~~ R(q) cos + R(m) cos ~tp p =O, 1, •~~ • in (16q=1 inFinally, these raw estimates are smoothed using the Hamming coefficientsto obtain the results:

S(p) — .23EL(p—1) + .54EL(p) + .23EL(p+1) (17)

where s(—i) s(i) and S(M+l) = S(M ~l)Sense switch 6 stakes it possible to obtai n an average correlation

function for a set of K digitized sample functions {x1(t)~ by f indingthe arithmetic mean of the individual normalized correlat i on functions.Power spectrum estimates are then found using equations 16 and 17 to

6

-- -~ —~~~~~-~~~~-~~~~~~~~~~~~~~~~~~~ -~~~~~~~~~~~~~~~~ -.

Page 8: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

~I..-

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ———- —

~

,- ------ -

~~~~~~~-- —-—— - - - - . --- — -

~~~~

- -

IJSL Tech Memo9l3-~ 2-65

operate on t l . i s average funct ion. T h i .~ prcct~~~. r~z3.1t~ i r ~ a 1. - t ~a~~i

in the relative variation or the eat imut~ s 01’ ~~~~ w w ~-r ~:p~~t~ urn • t cr~-random process x(t) by a factor of approxin~~t I r \ ‘

~ as I ~ i L r ~~te~in Fi gure 14• The solid curve represent s ~f t ~ ~~~~~ ~~1 t~~~t~ p w ~~spectral density of a band of white Gaussian rRJ~ e as L a l i ; t d f rom

•~ single sample function , ~rhereas the d t t t~ d C~~~~ \W ~n . t~~~~ iie 1 byaveragIng 10 samples in the maimer described above.

When using sense switch 6, both the I rid v i iua~ ~~~~~~ ~ J i~ t i uZ oriaand the average stay be printed out but only ~~~~~ averag e func t ion andits transform are available on a plotter tape.

A simplified flow chart given in ?lgure~ ~ 6 su~r~njtu :z~~s theorder in which all cal culations are perf ~ r ii i ~.I t L~. ~ i : g x~.m.

SUMMAEY

An outline of ~ method for estimating c~~ :~re~ spe~~.~~ Lii .~~i’ a

stationary random process from a digitized sam~ 1e ~~~~. ~~~; as developedby Blackman and Tukey has been given. A Fortran ~~~~~~~ has uee rwritten utilizing this approach. Parameters ti ac . hiu r~t be c~~~~ i 1 er ~~3‘when planning and before implementing such an ~is~i ‘

~ si &~ t~ ~er~defined and emphasis has been placed upon the }. i w it at ~ i~~ i mpos ed on tl~resolution that can be obtained from thi s type of a~ j.1:s i~~.

ACKNOWLEDGMENT

The author woul d l ike to thank Messrs. W. f~. j~~~ ar~1 P. F . K a . sfor writing and revis ing this computer p r -~~~~~1

~

BEVERLY C IlPi~~~i .f.Mathemat i c

~I.

7

Page 9: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

USL Tech Memo913-52-65

0 / 0

Figure 1

COMPARISON OF THE MAI4IING lAG WINDOW

AND

THE UNTFO!~4 WEIGHTING FUNCTION

Page 10: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

F’’ ~~~~~~~~~~~~~~~~~~~

1~ L Tech Memo913-52-65

w ( f ) — 2~n sin ~nrrm

n(r ) - .51~W( f) + .2 3W(f+ i ’\ + .2 3W (f _

____

\ 2Tm / \ 2Tm

/ ~o ~

w ( f ) 2O T m

I’ H(f)/1.08 Tm1 ’ ~~~.~~~~~~~

, ‘ 1 ’I’\ “

,

~~~~~~~~

. . I ’~!~

• ‘ \ \

6 -

7” /.o ,. ~~~~ ?Pm

Figure 2

A ‘ —~~~- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~-—

~~-— -‘ ..

~~~‘~~

Page 11: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

USL Tech Memo913-52-65

2° (r )

Idea], Low-Pass Fi lter

Physcla,lly RealizableFilter

N

f max0

IDEAL EXAMPLE PHYSICALLY EXAMPLELOW REA LIZABLEPASS

~‘max 5° cp~ FILTE R

~max =50 cps

1 se 1 secSAMPLING RATE ~t= 2finax .01 sec ~~~~~~~~~~~~~~~~~~~~~~~~~~ .0067

SAMPLES / SEC l/~t 100/sec ‘~~~~~~~ = i/a t 150/sec

DESIRE DESIRERESOLUTION xc’ps = .5 cps xcps = i/Tn . 5~ cps

2T’ DESIRE 2T’ DESIREDEGREES OF FREEDOM K = Tm 30 d.f. K = T m 30 d .f .

MAXIMUM LAG Tm = m .At -

1 / . 5 = 2 sec Tm = M.At 7.5 = 2sec

NUMBER OF LAGS M —

200 M 300APPROXIMATESAMPLE LENGTH T’=l/2K.Tm 30 sec T’ =l/2K.Tm 30 secAPPROXIMATENUMBER OF SAMPLES 2 flnax T’ - 30,000 3 fmax P’ 115, 000

I]

Figure 3

Page 12: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

USL Tech Memo913—52-65

~oo ,~~~-

‘ —~~ AVEk~AG~~— NOT A~~ RAGE~

H f :“‘- --‘F -

-:

I-4

H .frequency

Figure ~

I~DWER SPECTRtW OF A BMD OF WKLTE G.A~~~ LAN NOISE

01

Page 13: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

1 L r ~OGRAM NO. 0293

NO

~~~~~~~~ MPLTFIED YLOW CJIART

AVERAGING Y~Z FUNCTIONS

WANTED ~~~~BE A1~~RAGED

• N .<——

READ PLOTTERSEP UPINFORMATION

CREAD PARA~~~~~ CARD

~~~~~~~~ T A P A~~~~~~~ CARl)

3 DATA YES

EAD FOI~4AT “ READ DATABCD CARDS TAPE ,

NO

READ DATRAC TFIgure 5

AT~ ULATE ANDPRINT XP~ARl ___________________________________

SI(~(l

-~~~~-‘

Page 14: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~ ‘“~~~~~~~~~~~~~~~~~~~ --- - ---

2

NO<~AMPLE CoRRE~~ ~~~~~~~~

INC EQuATIOM~_______

~~~~~~~~

YES

CALCULATE R(p1~~INGEQUATION 114

_ _ _ _ _ _ _ _ _ _ _ _ _ _

READ PARM.~ TE CARD

NO

IS C,Ar.CUIA ISRAGING YES AVERAGE C~ S LAST

REQUIRED LATION FUNC’FI N FUNCTIONBE

A

NO YES

CALL• SUBROUTINE

P0 RE R

WRITE PLOTTER TAPE

CONTINUATION OF FLOW~~ INT R(p )~i~~~ ), S(p) CHA RT PROGRAM NO. O2Q’~

Fi gure 6

STOP

-— - • -~~~~~-‘-----~~~~~~~~ --~~~~~~~~~‘ -~~~~~~~~,-

Page 15: AO—A060 235 NAVY UNDERWATER SOUND LAB NEW LONDON …

L~ L Tech Memo913-52-65

DISTRIBUTION LIST

Code 100101900900H900C9029014.2 (5)906A906.1906.2907908

D. F. KassS. K. Leahy

910911.1911.2911.39U. i#912912.1913913.1913.2913.3

F. H. MenottiB. C. HassellB. W. PerneskiN. P. FiscbR. L. SchafferJ. P. BeemF. P. Fessenden

913S91149111.19114.29114.3921.3923.3931 • I93]. • 2932

L. J. Free