Frequency Domain


Sinusiod Review


The general form a sample sinusoid function is

$$sin \left( 2\pi f t + \phi \right)$$

where

  • $f$ is the frequency
  • $t$ is time
  • $\phi$ is the phase shift

Another common form is $$sin \left( \omega t + \phi \right)$$

where $\omega$ is the angular frequency and $\omega = 2 \pi f$

The period of a signal ($T$) is in reciprocal of the frequency

$$ T = \frac{1}{f} $$

Frequency is the number of cycles per unit time. Period is the amout of time for one cycle to complete.

Main Ideas of Frequency Analysis


There are two main ideas behind frequency analysis:

  • Many realizations are made up of various frequency components.
  • The frequency content may provide a better understanding of the process generating the data.

Note: spectral density of white noise if constant with an amplitude of one, meaning that all frequencies are unifformly present in white noise.

Periodic Functions


A function $f$ is periodic if and only if $p$ is the smallest value such that $f(x) = f(x + k p)$ for all x and integers k. If no value $p$ exists, the $f$ is aperiodic.

Real signals may be psuedo-periodic having a similar shape that repeats in a consistent cycle.

Tranfromation to Frequency Domain


Signals can be transformed into the frequence domain with a Fourier Series (periodic signals) or a Fourier Transform (aperiodic signals). Periodic signals can be directly transformed into the frequency domain by decomposition into a Fourier series because sine and cosine form a basis for the subspace of period functions. Aperiodic functions must be transformed with the Fourier transfrom, which can be used for any general aperiodic function.

Spectral Density Estimation


Spectral density is given by

$$ S_x \left( f \right) = 1 + 2 \sum^\infty_{k=1} \rho_k cos \left( 2 \pi f k \right) $$

The estimated sample spectral density is limited by the number of sample autocorrelations that can be estimated, exactly $N-1$ autocorrelations.

The estimate of $S_x \left( f \right)$ is given by

$$ \hat{S}_x \left( f \right) = 1 + 2 \sum^{N-1}_{k=1} \hat{\rho}_k cos \left( 2 \pi f k \right) $$

However, because the later (high $k$) sample autocorrelations are low quality (estimated with a small number of samples) the sample spectral density components are "smoothed" with a window function to minimize the impact from low quality autocorrelations and the spectrum estimate is commonly truncated at $M < N-1$. A window function is represented by $\lambda_k$, decreasing in magnitude with increasing $k$.

The including window smoothing, the sample spectral density becomes

$$ \hat{S}_x \left( f \right) = \lambda_0 + 2 \sum^{N-1}_{k=1} \lambda_k cos \left( 2 \pi f k \right) $$

where $\lambda$ is a window function and $M$ is a truncation value (commonly $M = 2 \sqrt{N}$).

Autocorrelation Quality

The quality of autocorrelations is consider to decrease as the index $k$ increases. This is because the number of data points used to estimate the autocorrelation decreases incrementally as $k$ increases. At maximum $k$, the autocorrelation is estimated by one cross product $\left( x_t - \bar{x} \right) \left( x_{t+k} - \bar{x} \right)$.

Plotting Sample Spectral Density

On the raw frequency scale, frequency component peaks may be hard to see. It is common practice to plot the frequency magnitude in dB (10 $log$ 10). This transformation accentuates the frequency peaks.

Some Common Frequencies in Time Series


  • Yearly cycle: $\frac{1}{12} = 0.083$
  • Daily cycle in hours: $\frac{1}{24} = 0.0146$
  • Weekly cycle in hours: $\frac{1}{168} = 0.006$

References


  • [1] W. Woodward and B. Salder, "Frequency Domain", SMU, 2019
  • [2] J. Proakis and D. Manolakis, Digital Singal Processing, 4th ed., Upper Saddle River: Pearson Prenice Hall, 2007.