The Frequency Domain Time domain methods: regress present on past; - - PowerPoint PPT Presentation

the frequency domain time domain methods regress present
SMART_READER_LITE
LIVE PREVIEW

The Frequency Domain Time domain methods: regress present on past; - - PowerPoint PPT Presentation

The Frequency Domain Time domain methods: regress present on past; capture dynamics in terms of velocity (first order), accel- eration (second order), inertia, etc. Frequency domain methods: regress present on periodic sines and


slide-1
SLIDE 1

The Frequency Domain

  • Time domain methods:

– regress present on past; – capture dynamics in terms of velocity (first order), accel- eration (second order), inertia, etc.

  • Frequency domain methods:

– regress present on periodic sines and cosines; – capture dynamics in terms of resonant frequencies, etc.

1

slide-2
SLIDE 2

E.g. AR(2):

plot(ts(arima.sim(list(order = c(2,0,0), ar = c(1.5,-.95)), n = 144)))

  • Strong periodicity, around 16 peaks ⇒ period of around 9

samples.

  • Fitting an AR model doesn’t describe this:

xt = 1.50xt−1 − 0.95xt−2 + wt.

2

slide-3
SLIDE 3

Cyclical Behavior

  • Simplest case is the periodic process

xt = A cos(2πωt + φ) = U1 cos(2πωt) + U2 sin(2πωt). where: – A is amplitude; – ω is frequency, in cycles per sample; – φ is phase, in radians;

  • and U1 = A cos(φ), U2 = −A sin(φ).

3

slide-4
SLIDE 4

Folding Frequency; Aliasing

  • If ω = 0, xt = A cos(φ), constant.
  • If ω = 1? At t = 0, 1, 2, . . . , same thing!
  • ω = 0 is an alias of ω = 1.
  • All frequencies higher than ω = 1/2 have an alias in 0 ≤ ω ≤

1/2: cos[2π(k ± ω)t + φ] = cos(2πωt ± φ), t = 0, 1, 2, . . .

  • ω = 1/2 is the folding frequency.

4

slide-5
SLIDE 5
  • For example, ω = 0.8:
  • mega = 0.8;

phi = pi / 6; plot(function(x) cos(2 * pi * omega * x + phi), from = 0, to = 10); plot(function(x) cos(2 * pi * (1 - omega) * x - phi), from = 0, to = 10, add = TRUE, col = "red"); abline(v = 0:10, lty = 2, col = "blue");

  • Note:

– ω = 0.8 = 0.5 + 0.3, and 1 − ω = 0.2 = 0.5 − 0.3; – 1 − ω is ω “folded” around 0.5.

5

slide-6
SLIDE 6

Stationarity

  • If

xt = A cos(2πωt + φ) = U1 cos(2πωt) + U2 sin(2πωt). and φ is random, uniformly distributed on [0, 2π), then: E(xt) = 0, E

  • xt+hxt
  • = 1

2A2 cos(2πωh).

  • So xt is weakly stationary.

6

slide-7
SLIDE 7
  • Also

E(U1) = E(U2) = 0, E

  • U2

1

  • = E
  • U2

2

  • = 1

2A2, and E(U1U2) = 0.

  • Alternatively, if the U’s have these properties, xt is stationary

with the same mean and autocovariances: E(xt) = 0, E

  • xt+hxt
  • = 1

2A2 cos(2πωh).

7

slide-8
SLIDE 8
  • More generally, if

xt =

q

  • k=1
  • Uk,1 cos(2πωkt) + Uk,2 sin(2πωkt)
  • ,

where: – the U’s are uncorrelated with zero mean; – var

  • Uk,1
  • = var
  • Uk,2
  • = σ2

k;

then xt is stationary with zero mean and autocovariances γ(h) =

q

  • k=1

σ2

k cos(2πωkh).

8

slide-9
SLIDE 9

Harmonic Analysis

  • Any time series sample x1, x2, . . . , xn can be written

xt = a0 +

(n−1)/2

  • j=1
  • aj cos(2πjt/n) + bj sin(2πjt/n)
  • if n is odd; if n is even, an extra term is needed.
  • The periodogram is

P(j/n) = a2

j + b2 j .

  • The R function spectrum can calculate and plot the peri-
  • dogram.

9

slide-10
SLIDE 10
  • R examples:

par(mfcol = c(2, 1)); # one frequency: x = cos(2*pi*(0.123)*(1:144)) plot.ts(x); spectrum(x, log = "no") # and a second frequency: x = x + 2 * cos(2*pi*(0.234)*(1:144)) plot.ts(x); spectrum(x, log = "no") # and added noise: x = x + rnorm(144) plot.ts(x); spectrum(x, log = "no") # the AR(2) series: x = ts(arima.sim(list(order = c(2,0,0), ar = c(1.5,-.95)), n = 144)) plot(x); spectrum(x, log = "no")

  • Using SAS: proc spectra program and output.

10