The picture above shows waves on the sea. Their shape is much more complicated than the simple sine and cosines waves (see picture below) that I have used to represent waves in previous posts (like post 18.10).
Can we use the ideas developed to describe these simple waves to describe the more complicated waves shown in the first picture? Yes, we can. The reason is that any wave shape can be represented as the sum of a series of sine and/or cosine waves. This series is called a Fourier series after the French mathematician Joseph Fourier (1768-1830).
The picture above shows a wave that represents the electrical potential (measured in mV) (see post 17.44) plotted against time (measured in ms) (see post 16.12 to find out about prefixes like m and k in units). The potential has a peak of 1 mV then suddenly drops to – 1 mV; this oscillation occurs every 0.25 ms. So, the time-period (posts 16.14 and 18.10) of the wave is 1 ms = 0.001 s; the frequency (posts 16.14 and 18.10) is 1/0.001 Hz = 1 000 Hz = 1 kHz.
This wave is completely unlike a sine or cosine wave (appendix 6, post 16.50) – it is not a smooth curve but has a series of sharp corners. I’m going to show how this wave can be built by adding together sine waves like
Ψn = Ansin(2πfnt)
where An represents the amplitude of the wave, fn represents its frequency and t represents time. When n = 1, fn represents the fundamental frequency (in our example 1 kHz) and when n = 2, 3, 4, 5….. fn represents a harmonic (post 18.12) of this frequency. The table below shows the first 11 waves we will use to synthesise our square wave in the figure above. Look for a pattern to see what the higher harmonics are.
The figure above compares our square wave (black) with the fundamental sine wave (red). They both pass through zero at the same times but the peak height of the sine wave is higher.
To help synthesise the square wave, we add the n = 3 harmonic (green) to bring down the peak and add to the amplitude on either side – the sum of the fundamental and first harmonic is shown in blue in the picture above. This is more like the square wave but we still have some way to go.
In the picture above we add the n = 5 harmonic (purple) to create a new sum (blue) that is more like our square wave.
To make the sum (blue) even more like a square wave, I’ve added the n = 7 harmonic (yellow), to the picture above.
I’ve plotted this wave alone, in the picture above, to show that we’ve almost synthesised a square wave but one with ripples superimposed on it.
The picture above shows the result of adding the n = 3, 5, 7, 9, 11, 13 and 15 harmonics to the fundamental. The result is even more like our square wave but with some, low amplitude, ripples. We can see that adding further harmonics reduces the ripples. Mathematically, we need to add an infinite number of harmonics to synthesise the square wave. In practice, we simply add sufficient harmonics to synthesise a wave that is good enough for our purpose.
Note that we need only sine waves to synthesise our square wave, because the two waves have zero amplitudes at the same times. If we had placed our origin (t = 0) at the time corresponding to the centre of a peak in the potential, we would have used a cosine wave as our fundamental and further cosine waves for our harmonics – as shown in the picture below. (To make this clearer, see appendix 6 of post 16.50).
If you would like to explore Fourier series for yourself, see the appendix.
In the example above, we synthesised a wave that shows how a signal varies with time, at a fixed point in space. We can also synthesise a wave that represents how a signal varies in space at a fixed time. To do this, we use sine and cosine waves like
Ψn = Ansin(2πknx) and Ψn = Ancos(2πknx)
where kn = 1/λn (λn is the wavelength corresponding to f ) represents a spatial frequency, introduced in post 18.10 and x represents a distance.
Now we can think of a picture as a two-dimensional standing wave (post 18.12) viewed at an instant in time. So we could build up a picture by adding sine and cosine waves with the necessary spatial frequencies and amplitudes.
What’s the use of all this? It shows that the ideas we have developed, in posts 18.10, 18.11 and 18.12, from simple sine or cosine waves, can be applied to all waves. It also has many practical applications – like creating wave shapes that represent different sounds (post 18.13) in electronic music. It also forms the basis of a common technique for finding the three-dimensional structures of molecules (post 16.30). The distribution of electrons in a molecule shows the positions of its atoms (see post 16.29). We can synthesise a three-dimensional image of this distribution by adding sine and cosine waves with different spatial frequencies, as described above. But we need to know their amplitudes. These amplitudes can be measured from way in which crystals (post 16.37), containing these molecules, scatter x-rays, in a technique called x-ray crystallography.
There is a problem whenever we want to synthesise a wave with a required shape. How do we know the amplitudes to use? To do this, we need to perform a frequency analysis of the wave, using a mathematical technique called Fourier transformation – the subject of a later post.
To calculate the Fourier series, I used a spreadsheet (Microsoft Excel).
First, I created a column of numbers representing times, expressed as 4t (to stop the fractions becoming very small) to a maximum value of 4. Then I used them to calculate values for Ψn = Ansin(2πfnt). Next, I added the sine waves together. Some of the results are shown below.
I then used Insert→Charts→Scatter to produce the graphs. You can play around with colours and formats to produce a graph that you think looks attractive – which is what I have done. My graphs were labelled using Microsoft Power-point because I didn’t want numbers on the axes to be obscured by the sine waves.
You could do the same thing with the amplitudes in the tables below and see what happens.
Then try the same thing using cosine waves.