What are the dominant frequencies? Fourier transforms decompose a data sequence into a set of discrete spectral estimates – separate the variance of a time series as a function of frequency. A common use of Fourier transforms is to find the frequency components of a signal buried in a time domain signal.
FAST FOURIER TRANSFORM (FFT) In practice, if the time series f(t) is not a power of 2, it should be padded with zeros
What is the statistical significance of the peaks? Each spectral estimate has a confidence limit defined by a chi-squared distribution
Spectral Analysis Approach 1. Remove mean and trend of time series 2. Pad series with zeroes to a power of 2 3. To reduce end effect (Gibbs’ phenomenon) use a window (Hanning, Hamming, Kaiser) to taper the series 4. Compute the Fourier transform of the series, multiplied times the window 5. Rescale Fourier transform by multiplying times 8/3 for the Hanning Window 6. Compute band-averages or block-segmented averages 7. Incorporate confidence intervals to spectral estimates
Sea level at Mayport, FL July 1, 2007 (day “0” in the abscissa) to September 1, 2007 m m Raw data and Low-pass filtered data High-pass filtered data 1. Remove mean and trend of time series (N = 1512) 2. Pad series with zeroes to a power of 2 (N = 2048)
Cycles per day m 2 /cpd Spectrum of raw data Spectrum of high-pass filtered data
Day from July 1, 2007 Value of the Window Hanning Window Hamming Window 3. To reduce end effect (Gibbs’ phenomenon) use a window (Hanning, Hamming, Kaiser) to taper the series
Day from July 1, 2007 Value of the Window Hanning Window Hamming Window Kaiser-Bessel, α = 2 Kaiser-Bessel, α = 3 3. To reduce end effect (Gibbs’ phenomenon) use a window (Hanning, Hamming, Kaiser) to taper the series
m m Raw series x Hanning Window (one to one) Raw series x Hamming Window (one to one) Day from July 1, 2007 To reduce side-lobe effects 4. Compute the Fourier transform of the series, multiplied times the window
m m High-pass series x Hanning Window (one to one) High pass series x Hamming Window (one to one) Day from July 1, 2007 To reduce side-lobe effects 4. Compute the Fourier transform of the series, multiplied times the window
High pass series x Kaiser-Bessel Window α=3 (one to one) m Day from July 1, Compute the Fourier transform of the series, multiplied times the window
Cycles per day m 2 /cpd Original from Raw Data with Hanning window with Hamming window Windows reduce noise produced by side-lobe effects Noise reduction is effected at different frequencies
Cycles per day m 2 /cpd with Hanning window with Hamming and Kaiser- Bessel (α=3) windows
5. Rescale Fourier transform by multiplying: times 8/3 for the Hanning Window times for the Hamming Window times ~8/3 for the Kaiser-Bessel (Depending on alpha)
6. Compute band-averages or block-segmented averages 7. Incorporate confidence intervals to spectral estimates Upper limit: Lower limit: 1-alpha is the confidence (or probability) nu are the degrees of freedom gamma is the ordinate reference value
Probability Degrees of freedom
Includes low frequency N=1512
Excludes low frequency N=1512
Least Squares Fit to Main Harmonics The observed flow u’ may be represented as the sum of M harmonics: u’ = u 0 + Σ j M =1 A j sin ( j t + j ) For M = 1 harmonic (e.g. a diurnal or semidiurnal constituent): u’ = u 0 + A 1 sin ( 1 t + 1 ) With the trigonometric identity: sin (A + B) = cosBsinA + cosAsinB u’ = u 0 + a 1 sin ( 1 t ) + b 1 cos ( 1 t ) taking: a 1 = A 1 cos 1 b 1 = A 1 sin 1
The squared errors between the observed current u and the harmonic representation may be expressed as 2 : 2 = Σ N [u - u’ ] 2 = u 2 - 2uu’ + u’ 2 Then: 2 = Σ N {u 2 - 2uu 0 - 2ua 1 sin ( 1 t ) - 2ub 1 cos ( 1 t ) + u u 0 a 1 sin ( 1 t ) + 2u 0 b 1 cos ( 1 t ) + 2a 1 b 1 sin ( 1 t ) cos ( 1 t ) + a 1 2 sin 2 ( 1 t ) + b 1 2 cos 2 ( 1 t ) } Using u’ = u 0 + a 1 sin ( 1 t ) + b 1 cos ( 1 t ) Then, to find the minimum distance between observed and theoretical values we need to minimize 2 with respect to u 0 a 1 and b 1, i.e., δ 2 / δu 0, δ 2 / δa 1, δ 2 / δb 1 : δ 2 / δ u 0 = Σ N { -2u +2u 0 + 2a 1 sin ( 1 t ) + 2b 1 cos ( 1 t ) } = 0 δ 2 / δ a 1 = Σ N { -2u sin ( 1 t ) +2u 0 sin ( 1 t ) + 2b 1 sin ( 1 t ) cos ( 1 t ) + 2a 1 sin 2 ( 1 t ) } = 0 δ 2 / δ b 1 = Σ N {-2u cos ( 1 t ) +2u 0 cos ( 1 t ) + 2a 1 sin ( 1 t ) cos ( 1 t ) + 2b 1 cos 2 ( 1 t ) } = 0
Σ N { -2u +2u 0 + 2a 1 sin ( 1 t ) + 2b 1 cos ( 1 t ) } = 0 Σ N {-2u sin ( 1 t ) +2u 0 sin ( 1 t ) + 2b 1 sin ( 1 t ) cos ( 1 t ) + 2a 1 sin 2 ( 1 t ) } = 0 Σ N { -2u cos ( 1 t ) +2u 0 cos ( 1 t ) + 2a 1 sin ( 1 t ) cos ( 1 t ) + 2b 1 cos 2 ( 1 t ) } = 0 Rearranging: Σ N { u = u 0 + a 1 sin ( 1 t ) + b 1 cos ( 1 t ) } Σ N { u sin ( 1 t ) = u 0 sin ( 1 t ) + b 1 sin ( 1 t ) cos ( 1 t ) + a 1 sin 2 ( 1 t ) } Σ N { u cos ( 1 t ) = u 0 cos ( 1 t ) + a 1 sin ( 1 t ) cos ( 1 t ) + b 1 cos 2 ( 1 t ) } And in matrix form: Σ N u cos ( 1 t ) Σ N cos ( 1 t ) Σ N sin ( 1 t ) cos ( 1 t ) Σ N cos 2 ( 1 t ) b 1 Σ N u N Σ N sin ( 1 t ) Σ N cos ( 1 t ) u 0 Σ N u sin ( 1 t ) = Σ N sin ( 1 t ) Σ N sin 2 ( 1 t ) Σ N sin ( 1 t ) cos ( 1 t ) a 1 B = A X X = A -1 B
Finally... The residual or mean is u 0 The phase of constituent 1 is: 1 = atan ( b 1 / a 1 ) The amplitude of constituent 1 is: A 1 = ( b a 1 2 ) ½ Pay attention to the arc tangent function used. For example, in IDL you should use atan (b 1,a 1 ) and in MATLAB, you should use atan2
For M = 2 harmonics (e.g. diurnal and semidiurnal constituents): u’ = u 0 + A 1 sin ( 1 t + 1 ) + A 2 sin ( 2 t + 2 ) Σ N cos ( 1 t ) Σ N sin ( 1 t ) cos ( 1 t ) Σ N cos 2 ( 1 t ) Σ N cos ( 1 t ) sin ( 2 t ) Σ N cos ( 1 t ) cos ( 2 t ) N Σ N sin ( 1 t ) Σ N cos ( 1 t ) Σ N sin ( 2 t ) Σ N cos ( 2 t ) Σ N sin ( 1 t ) Σ N sin 2 ( 1 t ) Σ N sin ( 1 t ) cos ( 1 t ) Σ N sin ( 1 t ) sin ( 2 t ) Σ N sin ( 1 t ) cos ( 2 t ) Matrix A is then: Σ N sin ( 2 t ) Σ N sin ( 1 t ) sin ( 2 t ) Σ N cos ( 1 t ) sin ( 2 t ) Σ N sin 2 ( 2 t ) Σ N sin ( 2 t ) cos ( 2 t ) Σ N cos ( 2 t ) Σ N sin ( 1 t ) cos ( 2 t ) Σ N cos ( 1 t ) cos ( 2 t ) Σ N sin ( 2 t ) cos ( 2 t ) Σ N cos 2 ( 2 t ) Remember that: X = A -1 B and B = Σ N u cos ( 1 t ) Σ N u sin ( 2 t ) Σ N u cos ( 2 t ) Σ N u Σ N u sin ( 1 t ) u0a1b1a2b2u0a1b1a2b2 X =
Goodness of Fit: Σ [ - u pred ] Σ [ - u obs ] 2 Root mean square error: [1/N Σ (u obs - u pred ) 2 ] ½
Fit with M 2 only
Fit with M 2, K 1
Fit with M 2, S 2, K 1
Fit with M 2, S 2, K 1, M 4, M 6
Tidal Ellipse Parameters u a, v a, u p, v p are the amplitudes and phases of the east-west and north-south components of velocity amplitude of the clockwise rotary component amplitude of the counter-clockwise rotary component phase of the clockwise rotary componentphase of the counter-clockwise rotary component The characteristics of the tidal ellipses are: Major axis = M = Q cc + Q c minor axis = m = Q ac - Q c ellipticity = m / M Phase = -0.5 (theta cc - theta c ) Orientation = 0.5 (theta cc + theta c ) Ellipse Coordinates:
M2S2K1M2S2K1
Fit with M2 only (dotted) and M2 + M4 (continuous)
Fit with M2 only (dotted) and M2 + M6 (continuous)