Lecture 13
Lecture 13
STOCHASTIC HYDROLOGY
Lecture -13
Course Instructor : Prof. P. P. MUJUMDAR
Department of Civil Engg., IISc.
Summary
of
the
previous
lecture
2
FREQUENCY DOMAIN
ANALYSIS
3
Frequency Domain Analysis
• Auto correlation function or correlogram is used
for analyzing the time series in the time domain.
• Time domain analysis rk
Xt = dt + εt
xt
k
Correlogram
t
Periodic process with noise
4
Frequency Domain Analysis
• Periodicities in data can best be determined by
analyzing the time series in frequency domain.
5
Frequency Domain Analysis
• Spectral analysis is widely used in electrical
engineering, physics, meteorology and hydrology
• Hydrologic applications of spectral analysis
include:
– Dry and wet run analysis
– Synthetic data generation
– Hydrologic forecasting
– Climate change impact studies
6
Frequency Domain Analysis
N odd N even
N −1 N
,
2 2
X t = α0 + ∑ ⎡⎣α k cos ( 2π f k t ) + β k sin ( 2π f k t )⎤⎦ + ε t
k =1
t = 1, 2, …. N
k
fk = ;
N
kth harmonic of the fundamental frequency (1/N)
N
2
βk =
N
∑ x sin ( 2π f t )
t =1
t k k = 1, 2, …. M
n
1 t
α N /2 =
N
∑ ( −1) xt
t =1
β N /2 =0
9
Frequency Domain Analysis
• A variance spectrum divides the variance into no.
of intervals or bands of frequency.
• Spectral density (Ik) is the amount of variance per
interval of frequency.
N 2
I ( k ) = ⎡⎣α k + β k2 ⎤⎦ k = 1, 2, …. M
2
• Angular frequency
2π k
ωk = k = 1, 2, …. M
N
10
Frequency Domain Analysis
2π
ωk =
P
A plot of ωk vs I(k) is called spectrum
• Total area under the spectrum is
I(k)
equal to the variance of the
process
• A peak in the spectrum indicates
an important contribution to
variance at frequencies close to
ωk
the peak
• Prominent spikes indicate
periodicity
• Several expressions for spectrum
exist in literature
11
Example-1
Obtain ωk and I(k) for k=1
t Xt cos ( 2π f k t ) sin ( 2π f k t ) X t cos ( 2π f k t ) X t sin ( 2π f k t )
1 105 0.809 0.5878 84.945 61.719
2 115 0.309 0.9511 35.535 109.3765
3 103 -0.309 0.9511 -31.827 97.9633
4 94 -0.809 0.5878 -76.046 55.2532
5 95 -1 0 -95 0
6 104 -0.809 -0.5878 -84.136 -61.1312
7 120 -0.309 -0.9511 -37.08 -114.132
8 121 0.309 -0.9511 37.389 -115.083
9 127 0.809 -0.5878 102.743 -74.6506
10 79 1 0 79 0
Σ 15.523 -40.6849
12
Example-1 (contd.)
k
fk =
N
1
= = 0.1
10
2 N 2 N
α k = ∑ xt cos ( 2π f k t ) β k = ∑ xt sin ( 2π f k t )
N t =1 N t =1
2 2
= × (15.523) = × ( −40.6849 )
10 10
= 3.1046 = −8.13698
13
Example-1 (contd.)
N 2
I (k ) = ⎡⎣α k + β k2 ⎤⎦
2
10 ⎡ 2 2
= ( 3.1046 ) + ( −8.13698) ⎤
2 ⎣ ⎦
= 379.245
2π k
ωk =
N
2 × π ×1
=
10
= 0.62832
14
Frequency Domain Analysis
• Spectral density as defined earlier is also called as
line spectrum
15
Frequency Domain Analysis
• Line spectrum as defined is an inconsistent estimate
I(k)
0
0.5
1
1.5
2
2.5
I(k)
ω(k)
• The smoothened spectrum
is called as power
spectrum
ωk
• Power spectrum is a consistent estimate of spectral
density
16
Frequency Domain Analysis
• Power spectrum – Fourier cosine transform of auto
covariance function.
N −1
⎡ 2
⎤
I ( k ) = 2 ⎢c0 + 2 ∑ λ j c j cos ( 2π f k j )⎥
⎢ j =1
⎥
⎢⎣ ⎥⎦
17
Frequency Domain Analysis
Tukey window
1 ⎡ ⎛ 2π ⎞ ⎤
λ j = ⎢1 + 2 cos ⎜ ' ⎟ ⎥
2 ⎣ ⎝ M ⎠ ⎦
ωk
18
Frequency Domain Analysis
• Information content is extracted from spectrum.
• For a completely random series (e.g., uniformly
distributed random numbers), the spectral density
function is constant – termed as white noise
• White noise indicates that no frequency interval
contains any more variance than any other
frequency interval. (auto correlation function
ρk = 0, for k ≠ 0)
I(k)
ωk
19
Frequency Domain Analysis
The steps for analyzing the data are as follows
xt
• Plot the time series
t
ρk
ωk
20
Frequency Domain Analysis
• The spectrum shows prominent spikes (which
represent the periodicities inherent in the data)
• The period corresponding to any value of ωk may
be computed by 2π/ ωk.
21
Frequency Domain Analysis
Yt = µ + αˆ1 cos (ω1t ) + βˆ1 sin (ω1t ) + αˆ 2 cos (ω2t ) + βˆ2 sin (ω2t ) +
........... + αˆ d cos (ωd t ) + βˆd sin (ωd t )
I ≥ F ( 2, N − 2 )
24
Frequency Domain Analysis
• A necessary condition in stochastic models is that
the series being modeled must be free from any
significant periodicities.
• One way of removing the periodicities from the
time series is to simply transform the series into a
standardized one.
• One method of standardizing the series {Xt} is by
expressing {Xt} as the new series {Zt} where,
Zt =
( X t − Xi )
Si
25
Frequency Domain Analysis
• In a monthly series, for example, Xi is the estimate
of mean of month i to which period t belongs
• Si is the estimate of the standard deviation of
month i
• The series has zero mean and unit variance.
26
Example – 2
Monthly Stream flow (in cumec) statistics(1979-2008) for a
river is selected for the study. (Part data shown below)
Year Month S.No. Flow
1979 June 1 54.6
July 2 325.4
August 3 509.5
September 4 99.4
October 5 53.5
November 6 25.8
December 7 12.5
1980 January 8 5.6
February 9 3.1
March 10 2.2
April 11 0.9
May 12 0.81
27
Example – 2 (contd.)
The time series plot
900
800
700
Flow in Cumec
600
500
400
300
200
100
0
0
50
100
150
200
250
300
350
400
Time
28
Example – 2 (contd.)
• Correlogram
1.2
1
0.8
0.6
0.4
ρk
0.2
0
0
20
40
60
80
100
120
140
-‐0.2
-‐0.4
-‐0.6
Lag (k)
29
Example – 2 (contd.)
• Line Spectrum
6000000
5000000
4000000
3000000
I(k)
2000000
1000000
0
0
0.5
1
1.5
2
2.5
-‐1000000
ω(k)
30
Example – 2 (contd.)
• Power Spectrum
2000000
1800000
1600000
1400000
1200000
1000000
I(k)
800000
600000
400000
200000
0
0
0.5
1
1.5
2
2.5
-‐200000
W(k)
31
Example – 2 (contd.)
• Peaks represent the periodicities inherent in the
data.
P=2π/ ωk
• The peaks correspond to w(k) = 0.5236 indicating
a periodicity of 12 months,
• w(k) = 1.0472 : periodicity of 6 months,
• w(k) = 1.571 : periodicity of 4 months,
• w(k) = 2.094 : periodicity of 3 months
32
Example – 2 (contd.)
• Considering the first two periodicities are significant,
the two periodicities are removed from the original
series to get a new series {Zt}, where
Z t = Xt – Y t ,
Yt = µ + αˆ1 cos (ω1t ) + βˆ1 sin (ω1t ) + αˆ 2 cos (ω2t ) + βˆ2 sin (ω2t )
33
Example – 2 (contd.)
For t=1,
Y1 = 105.78 + 29.28cos ( 0.5236 ×1) + 172.93sin ( 0.5236 ×1)
+ ( −102.6 ) cos (1.0472 ×1) + 56.79sin (1.0472 ×1)
= 215.5
Z1 = X1 – Y1
= 54.6 – 215.5
= -160.9
And so on….
34
Example – 2 (contd.)
Time series plot of Zt,
500
400
300
Flow in Cumec
200
100
0
0
50
100
150
200
250
300
350
400
-‐100
-‐200
-‐300
Time
35
Example – 2 (contd.)
Correlogram of Zt,
1.2
1
0.8
0.6
0.4
ρk
0.2
0
0
20
40
60
80
100
120
140
-‐0.2
-‐0.4
-‐0.6
Lag, k
36
Example – 2 (contd.) Power Spectrum
of original series
I(k)
350000
300000
0
0.5
1
1.5
2
2.5
250000
W(k)
200000
I(k)
150000
100000
50000
0
0
0.5
1
1.5
2
2.5
-‐50000
ω(k)
37
Example – 2 (contd.)
• Significance test:
γ 2 ( N − 2)
I = 4 ρˆ
1
38
Example – 2 (contd.)
1 ⎡ N ⎤
ρˆ1 = ⎢ ∑ {xt − α1 cos (ω1t ) − β1 sin (ω1t )}⎥
N ⎣ t =1 ⎦
1
= × 36810.56
348
= 105.78
γ 2 ( N − 2 ) 30762 (348 − 2 )
I =
4 ρˆ1
=
4 ×105.78
= 25155
39
Example – 2 (contd.)
I > F ( 2,346 )
40
Example – 2 (contd.)
• The periodicities from the time series is removed
by transforming the series into a standardized one.
• The series {Xt} is expressed as the new series {Zt}
where, Month Mean Stdev.
Jun 117.49 52.24
Zt =
( X t − Xi ) Jul
Aug
474.50
421.39
150.18
126.53
Si Sep 145.94 77.65
Oct 66.61 30.67
Nov 22.99 13.26
The mean and standard Dec 10.30 9.82
deviation for each month Jan 5.55 9.16
is tabulated. Feb 1.91 0.74
Mar 1.09 0.54
Apr 0.76 0.51
May 0.80 0.60
41
Example – 2 (contd.)
For the first value (June month),
( 54.6 − 117.49 )
Z1 = = −1.204
52.24
Second value (July month)
( 325.4 − 474.5)
Z2 = = −0.993
150.18
Third value (August month)
( 509.5 − 421.39 )
Z3 = = 0.696
126.53
And so on….
42
Example – 2 (contd.)
• Series of Zt (part data shown)
Year Month S.No. Xt Zt
1979 June 1 54.6 -1.204
July 2 325.4 -0.993
August 3 509.5 0.696
September 4 99.4 -0.599
October 5 53.5 -0.428
November 6 25.8 0.212
December 7 12.5 0.224
1980 January 8 5.6 0.006
February 9 3.1 1.609
March 10 2.2 2.063
April 11 0.9 0.272
May 12 0.81 0.019
43
Example – 2 (contd.)
Time series of standardized data.
7.000
6.000
5.000
4.000
3.000
Flow
2.000
1.000
0.000
0
50
100
150
200
250
300
350
400
-‐1.000
-‐2.000
-‐3.000
-‐4.000
Time
44
Example – 2 (contd.)
Correlogram of standardized data.
1.2
1
0.8
0.6
ρk 0.4
0.2
0
0
10
20
30
40
50
60
70
80
90
100
-‐0.2
-‐0.4
Lag, k
45
Example – 2 (contd.)
Spectrum of standardized data.
30
25
20
15
I(k)
10
5
0
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1.8
-‐5
ω(k)
46
Example – 2 (contd.)
Test for significance for standardized data:
I < F ( 2,346 )