next up previous contents index
Next: Fourier analysis and reconstruction Up: Fourier analysis and resynthesis Previous: Fourier transform of a   Contents   Index

Fourier analysis of non-periodic signals

Most signals aren't periodic, and even a periodic one might have an unknown period. So we should be prepared to do Fourier analysis on signals without the comforting assumption that the signal to analyze repeats at a fixed period $N$. Of course, we can simply take $N$ samples of the signal and make it periodic; this is essentially what we did in the previous section, in which a pure sinusoid gave us the complicated Fourier transform of Figure 9.3, part (b).

However, it would be better to get a result in which the response to a pure sinusoid were better localized around the corresponding value of $k$. We can accomplish this using the enveloping technique shown in Figure 2.7 (page [*]). Applying this technique to Fourier analysis will not only improve our analyses, but will also shed new light on the enveloping looping sampler of Chapter 2.

Given a signal x[n], periodic or not, defined on the points from $0$ to $N-1$, the technique is to envelope the signal before doing the Fourier analysis. The envelope shape is known as a window function. Given a window function $w[n]$, the windowed Fourier transform is:

\begin{displaymath}
{\cal FT} \left \{ w[n] x[n] \right \} (k)
\end{displaymath}

Much ink has been spilled over the design of suitable window functions for particular situations, but here we will consider the simplest one, named the Hann window function (the name is usually corrupted to ``Hanning" in DSP circles). The Hann window is:

\begin{displaymath}
w[n] = {1\over 2} - {1\over 2} \cos(2\pi n / N)
\end{displaymath}

It is easy to analyze the effect of multiplying a signal by the Hann window before taking the Fourier transform, because the Hann window can be written as a sum of three complex exponentials:

\begin{displaymath}
w[n] = {1\over 2} - {1\over 4} {U^n} - {1\over 4} {U^{-n}}
\end{displaymath}

where as before, $U$ is a unit-magnitude complex number with argument $2\pi/N$. We can now calculate the windowed Fourier transform of a sinusoid $Z^n$ with angular frequency $\alpha $ as before:

\begin{displaymath}
{\cal FT} \left \{ w[n] {Z^n} \right \} (k)
\end{displaymath}


\begin{displaymath}
= {\cal FT} \left \{ {1\over 2} {Z^n} - {1\over 4} {(UZ)^n}
- {1\over 4} {({U^{-1}}Z)^n}\right \} (k)
\end{displaymath}


\begin{displaymath}
\approx \left [ \cos(\Phi(k) + i \sin(\Phi(k))\right ]
M(k + {{\alpha } \over {\omega}})
\end{displaymath}

where the phase term has been simplified to:

\begin{displaymath}
\Phi(k) \approx \pi (k + {{\alpha } \over {\omega}}))
\end{displaymath}

and the magnitude function is:

\begin{displaymath}
M(k) =
{\left [ {
{1\over 2}{D_N}(k)
+ {1\over 4}{D_N}(k + 1)
+ {1\over 4}{D_N}(k - 1)
} \right ] }
\end{displaymath}

The magnitude function $M(k)$ is graphed in Figure 9.5. The three Dirichlet kernel components are also shown separately.

Figure 9.5: The magnitude M(k) of the Fourier transform of the Hann window function. It is the sum of three (shifted and magnified) copies of the Dirichlet kernel $D_N$, with $N=100$.)
\begin{figure}\psfig{file=figs/fig09.05.ps}\end{figure}

The main lobe of $M(k)$ is four harmonics wide, twice the width of the main lobe of the Dirichlet kernel. The sidelobes, on the other hand, have much smaller magnitude. Each sidelobe of $M(k)$ is a sum of three sidelobes of ${D_n}(k)$, one attenuated by $1/2$ and the others, opposite in sign, attenuated by $1/4$. They do not cancel out perfectly but they do cancel out fairly well.

The sidelobes reach their maximum amplitudes near their midpoints, and we can estimate their amplitudes there, using the approximation:

\begin{displaymath}
{D_N}(k) \approx {
{N sin(\pi k) } \over {\pi k}
}
\end{displaymath}

and setting $k = 3/2, 5/2, \ldots$ gives sidelobe amplitudes, relative to the peak height $N$, of:

\begin{displaymath}
{2 \over {3 \pi}} \approx -13 \mathrm{dB} ,
{2 \over {5 \p...
...hrm{dB} ,
{2 \over {9 \pi}} \approx -23 \mathrm{dB} ,
\ldots
\end{displaymath}

The sidelobes drop off progressively more slowly so that the tenth one is only attenuated about 30 dB and the 32nd one about -40 dB. On the other hand, the Hann window sidelobes are attenuated by:

\begin{displaymath}
{2 \over {5 \pi}} - {1\over 2} [ {2 \over {3 \pi}} + {2 \over {7 \pi}} ]
\approx -32.30 \mathrm{dB}
\end{displaymath}

and $-42$, $-49$, $-54$, and $-59$ dB for the next four sidelobes.

This implies that applying a Hann window will allow us to isolate sinusoidal components from each other better in a Fourier transform (than if no Hann window is applied.) If a signal has many sinusoidal components, the sidelobes engendered by each one will interfere with the main lobe of all the others. Reducing the amplitude of the sidelobes reduces this interference.

Figure 9.6: The Hann-windowed Fourier transform of a signal with two sinusoidal components, at frequencies 5.3 and 10.6 times the fundamental, and with different complex amplitudes.
\begin{figure}\psfig{file=figs/fig09.06.ps}\end{figure}

Figure 9.6 shows a Hann-windowed Fourier analysis of a signal with two sinusoidal components. The two are separated by about 5 times the fundamental frequency $\omega $, and for each we see clearly the shape of the Hann window's Fourier transform. Four points of the Fourier analysis lie within the main lobe of $M(k)$ corresponding to each sinusoid. The amplitude and phase of the individual sinusoids are reflected in those of the (four-point-wide) peaks. The four points within a peak which happen to fall at integer values $k$ are successively one half cycle out of phase.

To fully resolve the partials of a signal, we should choose an analysis size $N$ large enough so that $\omega=2\pi/N$ is no more than a quarter of the frequency separation between neighboring partials. For a periodic signal, for example, the partials are separated by the fundamental frequency. For the analysis to fully resolve the partials, the analysis period $N$ must be at least four periods of the signal.

In some applications it works to allow the peaks to overlap as long as the center of each peak is isolated from all the other peaks; in this case the four-period rule may be relaxed to three or even slightly less.


next up previous contents index
Next: Fourier analysis and reconstruction Up: Fourier analysis and resynthesis Previous: Fourier transform of a   Contents   Index
Miller Puckette 2005-04-01