# All Science Fair Projects

## Science Fair Project Encyclopedia for Schools!

 Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary

# Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

# Frequency spectrum

In mathematics, physics and signal processing, the frequency spectrum shows the decomposition of a function, or wave, or signal, into its frequency components (the sinusoidal basis functions of the Fourier series).

It can be found from the result of a Fourier-related transform.

If the power spectrum gives information about the energy distribution among the frequency domain, the frequency spectrum gives information about the amplitude and the phase of each frequency component.

For audio signals amplitude corresponds to the air pressure, or to the movements of the diaphragm of a speaker. Its logarithm is usually measured in dB, so a null amplitude corresponds to −∞ dB.

 Contents

## Frequency analysis on a sampled signal

Ideally, one would use the full Fourier transform to compute the frequency spectrum, but often only a finite set of discrete samples is available, in which case one generally applies spectral estimation techniques to some form of discrete Fourier transform. This is also called non-parametric spectrum estimation, as no prior knowledge or assumption goes into the calculation. The contrasting approach is parametric spectrum estimation, e. g. using an autoregressive moving average model.

### Frequency-amplitude spectrum

Besides being important in mathematics and physics, the spectrum amplitude versus frequency is very important for digital signal processing and for audio processing software that needs to recognize the frequency of the signal before processing it.

Let x(t) be the equation of our sampled signal on the time domain.

Let [0, T] be the interval considered.

Let n be the number of sampled values of the signal.

Then the distance between two consecutive sampled values is dt=T/n, and the sampling frequency is fsampl = 1/dt.

Let xk = x(tk) = x(k dt) be the sampled values of the signal.

Since x(t) is real-valued, and since we are analysing the amplitude without being interested in knowing the phase, the discrete Fourier transform can be simplified by using Euler's formula:

 $f_j\,\!$ $= \sum_{k=0}^{n-1} x_k e^{-2 \pi i j k/n}$ $= \sum_{k=0}^{n-1} x_k \left ( \cos \left (\frac{2 \pi}{n} j k \right ) - i \sin \left (\frac{2 \pi}{n} j k \right ) \right )$ $= \sum_{k=0}^{n-1} x_k \cos \left (\frac{2 \pi}{n} j k \right ) - i \sum_{k=0}^{n-1} x_k \sin \left (\frac{2 \pi}{n} j k \right )$

Hence:

$\left | f_j \right | = \sqrt{\left ( \sum_{k=0}^{n-1} x_k \cos \left (\frac{2 \pi}{n} j k \right ) \right )^2 + \left ( \sum_{k=0}^{n-1} x_k \sin \left (\frac{2 \pi}{n} j k \right ) \right )^2}$

The value 2|fj|/n represents the amplitude of that component whose frequency is j/T.

Then it may be useful to draw a graph showing 2|fj|/n in function of j/T, so that it is possible to have an idea of the dominant frequency components.

Since the Nyquist frequency is half of the sampling frequency, there is no use in considering an interval larger than [0, fsamp / 2] on the frequency domain.

#### Example

If the equation of the signal is the following:

$x(t) = 1.2 \cdot \sin(2 \pi \cdot 8 \cdot t) + 0.6 \cdot \sin(2 \pi \cdot 10 \cdot t) + 0.8 \cdot \sin(2 \pi \cdot 12 \cdot t)$

The graph on the time domain is:

The graph on the frequency domain gives an idea of the frequency spectrum:

The same result would be obtained if the three components of the example had another phase. Even if they had three different phases, the result of the Amplitude versus Frequency analysis would be the same.

### Frequency-phase spectrum

The spectrum phase versus frequency is less important, but it is useful if one wants to know the phase displacement of each frequency component. It can be found again from the result of a Discrete Fourier transform.

### Window functions

The Fourier transform assumes that the signal can be reproduced by looping the sample. If the interval considered is not a multiple of the period, the end of the sample is not continuous with the beginning, the transform will contain errors and the frequency spectrum will not be so clear.

Then, it may be useful to multiply the signal by a window function before attempting any frequency analysis.