Fourier Synthesis

Introduction: We will take a simple waveform, break it into its components using a form of Fourier analysis, and try to recreate it with Fourier synthesis. Fourier synthesis is a wave addition algorithm. Wave addition is also called superposition of waves, a simple addition of instantaneous amplitudes.

Theory: Any complex waveform can be constructed from the sum of sine and cosine waves with the appropriated amplitudes and frequencies. This summation, called a Fourier series, looks like this:

Equation 1

where f(x) is a periodic function {f(x) = f(x + 2L)}. Either x or t can be used as the variable. If you use x then L is the half length of the wave; likewise, if your horizontal axis is time, T takes the place of L and is called the period. The term ao/2 is an offset AKA bias, that is, a constant which shifts the waveform up or down the y axis. The function f(x) defines the position of a point on the wave in space with 2L being the wavelength. The harmonics are n multiples (n = 1, 2, 3...) of the fundamental frequency for wavelength 2L. The coefficients an and bn are the amplitudes of each harmonic wave, given by the following integrals:

Equation 2
Equation 3

If one has an explicit function (e.g. f(x) = sin(2x)) to analyze, it is a fairly simply task to take the integrals, find the harmonic amplitudes, and using a math program recreate the original f(x). There is also a way to combine an and bn into a single An called the harmonic strength; it employs a phase angle, but we won't need that today.

However, this semester you won't be taking waves apart: you'll be putting them together. The assembly or synthesis of a wave is done discreetly by adding the instantaneous amplitudes, that is, the f(x) at a fixed interval i along the waves being summed. The animation below approximates the process:

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

Animation 1

Start with the fundamental (n=1) and sum from there. This technique is well-suited to how spreadsheets work: each cell contains a formula that is the instantaneous amplitude at that instant with harmonic strength An and harmonic n.

Wave addition is extant throughout engineering and physics, from optics to digital circuitry to seismic analysis. Two standard waveforms used in audio to simulate acoustic instruments are these:

Figure 1: Sawtooth
Figure 2: Square

These waves are the starting point for mimicking stringed instruments (sawtooth) and clarinets (square). Of course, the process doesn't end there: the envelope (time-dependent amplitude modulation) of the overall amplitude as well as the harmonic amplitude envelope play a critical role.

Figure 3: Spectral Envelope

This wave-addition technique doesn't produce the best results, but it is light on storage requirements compared with actually sampling the original wave for playback.

Task:

Procedure:

You will be making three waves, so let's have each wave on a separate Excel sheet (tabs at the bottom). Double click on the tab and you can name it appropriately.

Figure 4

  1. First I want to see a practice sine wave. I know you've made Excel sine waves twice before in this course but to do this exercise efficiently you should set things up thusly:

Figure 5

    1. Obviously this is for a single wave; your lab will add a series of single waves, sines and cosines, at different amplitudes and frequencies.
    2. See how there is one cell above the sine function that will affect its amplitude and another that will affect its frequency?
  1. For your practice wave you may have 13 indices as in Figure 5, but for your actual synthesized waves I want to see 257 for smoothness.
    1. Construct your x values so that the range from 0 to 2 pi, both here and later on.
    2. Construct your sine function so that by changing the value in ONE cell the height of the wave is adjusted.
    3. Construct your sine function so that by changing the value in ONE cell the frequency of the wave is adjusted.
    4. Place the small chart of your wave next to your calculations.
    5. When you have an adjustable sine wave think of it as one of the twenty harmonics needed for the synthesis; now move on to 3.
  2. Construct a separate column for each harmonic's sine and cosine and then sum them; do NOT put the harmonic sum into one formula.
  3. Use your adjustable spreadsheet to synthesize a square wave and a sawtooth wave.
    1. Your first column is the fundamental, n = 1 and a1 = 1. This is called normalizing; let all your other amplitudes be < 1.
    2. You need not have every harmonic beyond n = 1: for instance, you might have n = 3, n = 6, n = 9, etc. It depends on what shape you are trying to emulate.
    3. You can get close, but not perfect reproductions. If the sawtooth wave is reversed, technically called a ramp wave, that will be sufficient.
  4. Make a graph of the amplitude vs harmonic number for each waveform. Note, this is not a waveform but a column graph similar but not identical to this one:

Figure 6