*Before you read this*, *I suggest you read* post 23.8.

Let’s think about a wave or signal that looks like the picture above. It might be the result of an observation – for example, the electrical signal that results from recording a sound using a microphone. In this example we might want to know the relative proportion of the different frequencies (pitches) that characterise the quality of sound produced by a violin and that enable us to distinguish it from the sound made by a guitar (see post 18.12). We would need this information if we wanted to design a synthesizer that could mimic the sounds of different musical instruments. The same principles apply to voice recognition software and smartphone apps that recognise bird species from their songs.

In our example, we could think of the picture as an electrical potential, *ψ*(*t*) recorded as a function of time, *t*, from an initial time (defined as *t* = 0) until a final time (*t* = *τ*). Then, to distinguish musical instruments (or human voices or bird songs), the information we require is provided by a frequency analysis – as described in post 23.8. In post 23.8, we performed the frequency analysis by calculating the Fourier transform, *F*(*ω*), of *ψ*(*t*), defined by

Here *ω* represents an angular frequency and *i* is the square root of -1.

But we now have two problems.

Problem 1. The Fourier transform has an infinite extent in time. But our signal is defined only in the range 0 ≤ *t* ≤ *τ*.

Problem 2. To calculate the Fourier transform, we to represent *ψ*(*t*) by a continuous mathematical function. But our signal does not resemble any recognisable function.

We can solve these problems by representing *ψ*(*t*) by a series of *ψ* values at *N* intervals in time separated by a time interval Δ*t*, as shown in the picture below.

In this picture, the first interval (0 ≤ *t* ≤ Δ*t*) occurs at a mean time of *t*_{1} = Δ*t*/2 and is associated with a mean *ψ* value of *ψ*_{0} + *ψ*_{1}. Here *ψ*_{0}, *ψ*_{1}, *ψ*_{2}, *ψ*_{3} … are the values of *ψ* at times 0,Δ*t*, ,2Δ*t*, 3Δ*t* … All this assumes that Δ*t* is sufficiently small that all *ψ* values between *ψ _{n}*

_{-1}and

*ψ*lie on a straight line (we shall return to the value of Δ

_{n}*t*later). The table below shows the mean values of the time,

*ψ*, and

*ω*(2π/

*t*) for each of the

*n*time intervals.

To solve our problems, we represent the Fourier transform by a sum of discrete terms, representing discrete intervals in time. The result is

where the final step uses Euler’s relation and *F _{d}*(

*ω*) is called the

*discrete Fourier transform*. I have written

*e*in the form of exp(

^{x}*x*) to make the equation easier to read. This is like the method we used to calculate the submerged volume of the hull of a ship in post 17.8.

According to post 23.8, we can write this result as

where *a _{n}* and

*b*are the coefficients of cos(

_{n}*ω*

_{n}*t*) and sin(

_{n}*ω*

_{n}*t*), respectively, that we can add together to form

_{n}*ψ*(

*t*).

We can see, from the table, that the lowest angular frequency is *ω _{N}*; this is the fundamental frequency and

*ω*

_{N-}_{1},

*ω*

_{N-}_{2},

*ω*

_{N-}_{3}, … are possible harmonics (see post 18.12).

The values of (*a _{n}*/

*a*) are the relative contributions of cosine waves of angular frequency

_{N}*ω*to our signal; the values of (

_{n}*b*/

_{n}*b*) are the relative contributions of sine waves of angular frequency

_{N}*ω*to our signal. If the calculated value of (

_{n}*a*/

_{n}*a*) is very small then that cosine wave makes a negligible contribution; if the calculated value of (

_{N}*b*/

_{n}*b*) is very small then that sine wave makes a negligible contribution.

_{N}But we need to be careful when *n* = 1, because *ω*_{1} corresponds to the sampling frequency. But, according to the Nyqvist criterion, the lowest frequency that we can detect is twice the sampling frequency. This means that our *n* = 1 results could be unreliable because of aliasing. So, our highest frequency harmonic, for which we have reliable information, corresponds to *n* = 2.

We can think of what I’ve written in the previous paragraph in a different way by thinking about the question, “How do we choose the value of Δ*t*?”. Let’s suppose that the highest frequency harmonic we want to know about has an angular frequency *ω*_{max}. that corresponds to a time period of 2π/*ω*_{max}. According to the Nyqvist criterion, our minimum sampling frequency must be 2*ω*_{max}. which correspond to a time period of π/*ω*_{max}. This is the minimum value of Δ*t* that we can use to reliably detect our required highest frequency harmonic.

Related posts