Fitting Sine Waves and Computing the Periodogram Flashcards

frequency, aliasing, the DFT, spectral density and periodogram

1
Q

What is spectral analysis?

A

-in spectral analysis, a time series is analysed by decomposing it into sine waves of different amplitude and frequency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Spectral Analysis

Low Frequency

A

-slowly changing trends

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Spectral Analysis

High Frequency

A

-rapid changes (noise)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Spectral Analysis Model

A

-if the data have a periodic component of known frequency, we can fit the following model:
Xt = B sin[2πf (t-to)] + μ + εt
-where:
μ is the baseline/mean
f is the frequency (in cycles per unit time)
to is the start time of one period
B is the amplitude

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Spectral Analysis Model in Terms of Sine and Cosine

A

Xt = Acos(2πft) + Bsin(2πft) + μ + εt

-therefore only two parameters (A,B) are required per frequency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Aliasing

Definition

A

-two frequencies that are indistinguishable from each other are aliases of each other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Nyquist Frequency

Definition

A
  • assume that the observations are given at times 0, Δ, 2Δ 3Δ, …
  • we have a sampling frequency of 1/Δ
  • the frequency f=1/2Δ is called the Nyquist frequency for the sampling frequency 1/Δ
  • this is the fastest possible oscillation that can be recognised when we have a sampling frequency of 1/Δ
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Nyquist Frequency

Explaination

A

-assume that the observations are given at times 0, Δ, 2Δ 3Δ, …
-we have a sampling frequency of 1/Δ
-a component with frequency f will be observed as:
Xk = Acos(2πfkΔ) + Bsin(2πfkΔ)
-the bigger f, the faster Xk oscillates until when f=1/2Δ, then:
Xk = A (-1)^k
-this is the fastest possible oscillation that can be recognised when we have a sampling frequency of 1/Δ
-for f>1/2Δ we only have aliases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are Discrete Fourier Transforms?

A

-a method for decomposing a time series into periodic components

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Fourier Frequencies

Definition

A
  • if we have observations Xt at t=0,1,2,…,n-1

- frequencies fj = j/n are called Fourier frequencies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The Discrete Fourier Transform

Definition

A

-the DFT of Xo,…,Xn-1 is given by:
Xj^ = 1/√n Σ Xt exp(-2πifjt)
-sum from t=0 to t=n-1, for j=0,…,n-1
-here ^ indicates a DFT, not an estimate

Xj^ = 1/√n Σ Xt[cos(2πifjt) - isin(2πifjt)]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Inverse DFT Lemma

A

Σ exp(2πifjt) exp(-2πifkt)
= n, j=k or 0, else
-sum from t=0 to t=n-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The Inverse DFT

A

Xt = 1/√n Σ Xj^ exp(2πifjt)

-sum from j=0 to j=n-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Properties of the DFT

A

1) linearity
2) conservation of energy
3) time shifts (cyclic shift)
4) time shifts (linear shift)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Linearity of the DFT

A

-let Yt=cXt :
Yj^ = c
Xj^
-let Zt = Xt + Yt :
Zj^ = Xj^ + Yj^

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Conservation of Energy with the DFT

A

-energy in the frequency domain equals energy in the time domain:
Σ |Xj^|² = Σ |Xt|²
-sum from j=0 to j=n-1 and t=0 to t=n-1

17
Q

Cyclic Time Shifts with DFT

A

-can take the set of measurements {X0,X1,…,Xn-2,Xn-1} can be viewed as a cycle of measurements so you can pick any measurement as the first one
-let Y = (Xn-1,X0,…,Xn-2) :
Yj^ = exp(-2πifjt) Xj^
=>
|Yj^| = |Xj^|

18
Q

Linear Time Shifts with DFT

A
  • view the measurements as a linear line, and shift the window e.g. miss one measurement off the end and pick one up at the start
  • let Z = (X-1,X0,X1,…,Xn-2) with the new measurement X-1∈R
19
Q

Compare Cyclic and Linear Shift

A

||Y^-Z^|| = |Xn-1 - X-1|

-therefore the relative difference between Y^ and Z^ goes to zero as n->∞

20
Q

Spectral Density

Definition

A

-the function I : [0,1] -> [0,∞) with:
I(fj) = |Xj|²
-is called the spectral density of X
-the spectral density I(fj) is a measurement of how strongly the frequency fj is represented in the data

21
Q

Periodogram

Definition

A

-plot of the spectral density I(fj) against fj

22
Q

How many frequencies are needed?

A
-for real data {Xt}, we have:
Xn-j^ = Xj^*
-where * indicates a complex conjugate
-so only half the frequencies are needed
-this is expected since fj fj=j/n is greater than the Nyquist frequency for j>n/2
23
Q

Xo^ in terms of X~

A

-let X~ be the mean of {Xt}, then:

Xo^ = X~√n

24
Q

Xn/2^ when n is even

A

Xn/2^ = Xn-n/2^* = Xn/2^* so they must be real numbers