Fourier Analysis

Fourier Analysis

Fourier Analysis Hilary Weller <[email protected]> 19th October 2015 This is brief introduction to Fourier analysis and how it is used in atmospheric and oceanic science, for: Analysing data (eg climate data) • Numerical methods • Numerical analysis of methods • 1 1 Fourier Series Any periodic, integrable function, f (x) (defined on [ π,π]), can be expressed as a Fourier − series; an infinite sum of sines and cosines: ∞ ∞ a0 f (x) = + ∑ ak coskx + ∑ bk sinkx (1) 2 k=1 k=1 The a and b are the Fourier coefficients. • k k The sines and cosines are the Fourier modes. • k is the wavenumber - number of complete waves that fit in the interval [ π,π] • − sinkx for different values of k 1.0 k =1 k =2 k =4 0.5 0.0 0.5 1.0 π π/2 0 π/2 π − − x The wavelength is λ = 2π/k • The more Fourier modes that are included, the closer their sum will get to the function. • 2 Sum of First 4 Fourier Modes of a Periodic Function 1.0 Fourier Modes Original function 4 Sum of first 4 Fourier modes 0.5 2 0.0 0 2 0.5 4 1.0 π π/2 0 π/2 π π π/2 0 π/2 π − − − − x x 3 The first four Fourier modes of a square wave. The additional oscillations are “spectral ringing” Each mode can be represented by motion around a circle. ↓ The motion around each circle has a speed and a radius. These represent the wavenumber and the Fourier coefficients. Which is which? speed is wavenumber, radius is coefficient 4 Equivalently, equation (1) can be expressed as an infinite sum of exponentials using the relation eiθ = cosθ + isinθ where i = √ 1: − ∞ ∞ ∞ a0 ikx f (x) = + ∑ ak coskx + ∑ bk sinkx = ∑ Ake . (2) 2 k=1 k=1 k= ∞ − Exercise Evaluate the Aks in terms of the aks and bks. 5 2 Fourier Transform The Fourier Transform transforms a function f which is defined over space (or time) into • the frequency domain, so that it is defined in terms of Fourier coefficients. The Fourier transform calculates the Fourier coefficients as: • 1 π 1 π ak = f (x)cos(kx)dx , bk = f (x)sin(kx)dx π ˆ π π ˆ π − − 3 Discrete Fourier Transform A discrete Fourier Transform converts a list of 2N + 1 equally spaced samples of a real valued, periodic function, fn, to the list of the first 2N + 1 complex valued Fourier coefficients: N 1 iπnkx/N Ak = ∑ fn e− . N n= N − The truncated Fourier series: N ikx f (x) ∑ Ake ≈ k= N − is an approximation to the function f which fits the sampled points, fn, exactly. On a computer this is done with a Fast Fourier Transform (or fft). The inverse Fourier transform (sometimes called ifft) transforms the Fourier coefficients back to the f values (transforming from spectral back to real space): fft f0, f1, f2, f2N A0,A1, A2N ··· −−−→ifft ··· A ,A , A f , f , f , f 0 1 ··· 2N −−−→ 0 1 2 ··· 2N 6 4 Differentiation and Interpolation If we know the Fourier coefficients, Ak, of a function f then we can calculate the gradient of f at any point, x: If ∞ ∞ ∞ ikx f (x) = ∑ ak coskx + ∑ bk sinkx = ∑ Ake (3) k=0 k=0 k= ∞ − then ∞ ∞ ∞ ikx f 0(x) = ∑ kak sinkx + ∑ kbk coskx = ∑ i k Ake . (4) k=0 − k=0 k= ∞ − and the second derivative: ∞ ∞ ∞ 2 2 2 ikx f 00(x) = ∑ k ak coskx ∑ k bk sinkx = ∑ k Ake . (5) k=0 − − k=0 k= ∞ − − These have spectral accuracy; the order of accuracy is as high as the number of points. Similarly equation 1 or 2 can be used directly to interpolate f onto an undefined point, x. Again, the order of accuracy is spectral. 5 Spectral Models ECMWF use a spectral model. • The prognostic variables are transformed between physical and spectral space using ffts • and iffts. Gradients are calculated very accurately in spectral space • 6 Wave Power and Frequency If a function, f , has Fourier coefficients, a and b , then wavenumber k has power a2 + b2. • k k k k A plot of wave frequency versus power is referred to as the power spectrum. Before we • learn how power spectra are used, we will have some revision questions... 7 7 Recap Questions 1. In the Fourier decomposition ∞ ∞ a0 f (x) = + ∑ ak coskx + ∑ bk sinkx 2 k=1 k=1 what are: (a) the Fourier coefficients (the ak and the bk) (b) the Fourier modes (the sines and cosines) (c) the wavenumbers (or frequencies) (the ks) 2 2 (d) the power of a given wavenumber (ak + bk) 2. How would you describe the operation: 1 π 1 π ak = f (x)cos(kx)dx , bk = f (x)sin(kx)dx π ˆ π π ˆ π − − (a Fourier transform) 3. Given a list of 2N + 1 equally spaced samples of a real valued, periodic function, fn, how would you describe the following operation to convert this into a a list of N + 1 values: N 1 iπknx/N Ak = ∑ fn e− N n= N − (a discrete Fourier transform) 4. What is the wavelength of a wave described by sin4x (2π/4) 8 8 Analysing Power Spectra Daily rainfall at a station in the Middle East for 21 years 60 daily rainfall Fourier filtered using 40 wave numbers Obervations about the 50 Truncated Fourier 40 filtered rainfall: 30 very smooth (only low 20 rainfall (mm) • wavenumbers included) 10 includes negative values 0 • – “spectral ringing” 0 5 10 15 20 years Power Spectrum of Middle East Rainfall 100 10-1 Observations 10-2 10-3 dominant frequency at one year power • 10-4 (annual cycle) -5 power at high frequencies (ie 10 • 10-6 daily variability) 10-1 100 101 102 Number per year number per year = wavenumber 365/total number of days × 9 Time Series of the Nino 3 sea surface temperature (SST) The SST in the Nino 3 region of the equatorial Pacific is a diagnostic of El Nino 30 raw 2 years and slower 29 annual cycle How were the dashed lines generated? 28 Annual cycle is the • 27 Fourier mode at 1 year 26 The “two years and SST (deg C) • slower” filtered data is 25 the sum of all the 24 Fourier modes of these frequencies. 23 1990 1995 2000 2005 2010 Power Spectrum of Nino 3 SST 1 Observations 0.1 Dominant frequency at 1 year (annual 0.01 • cycle) 0.001 power Less power at high frequencies (SST • 0.0001 varies slowly) 1e−05 Power at 1-10 years (El Nino every 3-7 • 1e−06 years) 0.01 0.1 1 10 Frequency (per year) 10 Time Series of the Quasi-Biennial Oscillation (QBO) The QBO is an oscillation of the equatorial zonal wind between easterlies and westerlies in the tropical stratosphere which has a mean period of 28 to 29 months: Power Spectrum of QBO 8 10 Observations 107 6 Dominant frequency at 10 • 105 close to 2 years 4 power 10 Less power at high 3 • 10 frequencies 102 Less power at long 101 • time-scales 10-2 10-1 100 101 frequency (per year) 11.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us