You are on page 1of 5

# What is power spectral density function?

Power spectral density function (PSD) shows the strength of the variations(energy)
as a function of frequency. In other words, it shows at which frequencies variations
are strong and at which frequencies variations are weak. The unit of PSD is energy
per frequency(width) and you can obtain energy within a specific frequency range
by integrating PSD within that frequency range. Computation of PSD is done directly
by the method called FFT or computing autocorrelation function and then
transforming it.

## What you can do with power spectral density function?

PSD is a very useful tool if you want to identify oscillatory signals in your time series
data and want to know their amplitude. For example let assume you are operating a
factory with many machines and some of them have motors inside. You detect
unwanted vibrations from somewhere. You might be able to get a clue to locate
offending machines by looking at PSD which would give you frequencies of
vibrations. PSD is still useful even if data do not contain any purely oscillatory
signals. For example, if you have sales data from an ice-cream parlor, you can get
rough estimate of summer sales peak by looking at PDF of your data. We quite often
compute and plot PSD to get a "feel" of data at an early stage of time series
analysis. Looking at PSD is like looking at simple time series plot except that we look
at time series as a function of frequency instead of time. Here, we could say that
frequency is a transformation of time and looking at variations in frequency domain
is just another way to look at variations of time series data. PSD tells us at which
frequency ranges variations are strong and that might be quite useful for further
analysis.

What does power spectral density function of actual data look like?
We picked up oceanographic data as an example here but they can be anything like
the variations of population of your city. Having said that, Figure 1a shows power
spectral density function of east-west(zonal) current on the equator. Data were
obtained from the web site of National Oceanic and Atmospheric Administration,
U.S.A. (http://www.pmel.noaa.gov/tao). The horizontal axis of this figure is the
period. In case of oceanographic data the variations of fixed frequencies such as
tides would appear as distinctive peaks. Other than these sharp peaks
oceanographic data generally show broad peak, or one might call a hill, at low
frequency range. Energies are fed to the ocean usually from the atmospheric
variations at these low frequencies. The energy decreases exponentially from there
toward higher frequencies. The energy at these frequencies is transferred from
lower frequencies by non-linear processes and it will be eventually lost as heat by
viscosity at much higher frequencies. The tidal components in Figure 1a appear as

distinctive peaks at about 1.0 and 0.5-day as well as at 0.33 and 0.21-day. The
former two are diurnal (once a day; marked by *D) and semi-diurnal (twice a day;
marked by *SD) tides and further analysis indicates they consist of several
components of slightly different periods. Later two components (marked by green
*)are probably real but they are not so commonly seen. PSD is almost proportional
to -5/3 power of frequency at periods from about 50 to 1-day. This "power-law" is a
characteristic of spectral distribution in the so called inertial sub-range where the
energy is supposed to be transferred from lower frequency variations but it is
somewhat deceptive provided that further analysis suggests atmospheric motions
have strong influences on oceanic variations at these frequencies. Figure 1b shows
time series plot of input data and Figure 1c shows initial 240 data corresponding to
10 days duration. There supposed to be 10 diurnal cycles and 20 semi-diurnal cycles
but those variations are not easy to see without proper filtering although PSD
clearly shows the existences of those variations. Thus, this example demonstrates
usefulness of PSD.

Is
power
spectral
density
function
always
useful?
Unfortunately, no but in some senses, we might say yes. The left panels of Figure 2
shows plots of five different sets of time series data and the right panels of Figure 2
shows PSD of those. The thin horizontal lines in the left panels indicate zero level.
The single pulse (top row) in the middle of the time series, although its location is
unimportant, results flat PSD all across the frequency. This is what the theory says.
If your data have a strong spike-like noise somewhere, that spike might boost
energy level everywhere and make everything else obscure.
The periodic spike signal (second row) produces periodic peaks, called harmonics,
on PSD although the spikes in the time series occur at a fixed interval. You might
have this kind of data when your data are contaminated by sparks caused by some
kind of rotational machinery such as a motor.
If your data have a shape of rectangular wave (third row), you will get harmonics
again on PSD. You might encounter a pattern like this if you measure clock outputs
on logic circuits. Is this a problem? If you want to know the frequency of rectangular
waves as rectangular waves instead of summations of sinusoidal waves, probably
yes. Walsh spectral is suited for your problem. However, if you want to know how
much bandwidth is necessary for your digital data transmission, the answer might
be no. The pattern of digital data is usually not as regular as the example we show
here.
All of these "problems" occur from that fact that PSD is basically trying to
decompose input data into a series of sinusoidal waves (4th row is a case of
sinusoidal wave) of different frequencies. It requires lots of (quite often infinite) high
frequency sinusoidal waves to reproduce input data properly when input data have
signals that have shapes nowhere close to a sinusoidal wave, especially when they
have sharp corners. Situation like this may cause a problem called aliasing and it is

affected by a sampling rate, by the way you sample data rather than by the
characteristics of data themselves. We might be able to guess "the problem" of time
series data by looking at PSD although it would probably much easier to look at time
series plot at first.
If input data have a shape of a nice sinusoidal wave (4th row), PSD shows its
frequency nicely. The peak on PSD in the figure has a width, three frequency points
in this case, but this is because we applied a "spectral window" which is necessary
to evaluate confidence interval of amplitude but it makes peaks broaden. There is a
trade off between the accuracies of the estimation of amplitude and of frequency.
"Raw spectral"(the result before applying a spectral window) shows a peak at one
frequency (band) in this case.
Next, we cut off peaks of this sinusoidal wave so that it has flat tops with sharp
corners as a final example (5th row). The amplitude of the signal shown in the 4-th
row is 1.0. We clipped values above 0.95 and below -0.95. Situation like this might
occur when you have a beautiful sinusoidal wave as an input to your amplifier but
the amplitude of the input is too large for your amplifier. Casual look of a time series
plot might miss this saturation but PSD would probably remind you about it.

## What is cross spectral density function?

When we have two sets of time series data at hand and we want to know the
relationships between them, we compute coherency function and some other
functions computed from cross spectral density function (CSD) of two time series
data and power spectral density functions of both time series data. If we have more
than two sets of time series data, we might compute frequency domain complex
empirical orthogonal functions from cross spectral density function to know the
relationships among those data. The cross spectral density function is a Fourier
transform of cross correlation function but we can compute CSD directly using a
method called FFT.