Fourier analysis has many applications, but this is topic is an introduction into Fourier analysis as it applies to signal processing.
Suppose that a complex signal x(t) is the sum of simple waves
with different amplitude An, frequency fn, and phase τn. Using trigonometric identities we write
for some coefficients Bn = An cos(2π fn τn) and Cn = An sin(2π fn τn). Since cos(2π fn t) and sin(2π fn t) are the cosine and sine functions with zero phase, the phase of each simple wave in the signal x(t) is completely determined by the coefficients Bn and Cn and we can work without the phase τn.
Orthogonal functions and the Fourier series
Sine and cosine functions of different frequencies are orthogonal for carefully chosen intervals and frequencies. If m and n are two different integer frequencies, then
Since m and n are integer and different, the expressions sin(2π (m – n)) and sin(2π (m + n)) evaluate to zero. We can similarly verify that two sine functions are orthogonal and that a sine and a cosine functions are orthogonal in the given interval for integer values of m and n.
The result is not the same for m = n. sin(m t) and cos(m t) are still orthogonal, but sin(m t) and sin(m t) are not, and cos(m t) and cos(m t) are not.
The sine and cosine functional form that we use above is not our only option. By substituting t with t 2π / T for some interval of time T, we can similarly show that the sine and cosine functions of the form
are also orthogonal, this time over the interval from 0 to T. If T = 1 and the signal x(t) happens to consist only of integer frequencies fn, then we can say that the signal x(t) is the sum of orthogonal functions.
The simple waves in x(t) are orthogonal over the interval from 0 to 1, of course, only if x(t) consists of simple waves with integer frequencies.
This is an important result. If x(t) does in fact consist of integer frequencies, then its simple waves are orthogonal in the interval from 0 to 1, and we can compute the magnitudes of the coefficients Bn and Cn.
Frequency content of signals
Since, by definition
for some amplitude An and phase τn, then
We know that An is the amplitude of the n-th simple wave in the signal and 2π n τn is the phase of the n-th simple wave expressed as portions of the wave's cycle.
Thus, if a signal over a properly chosen interval consists of simple waves with integer frequencies, then we can compute the amplitude and phase of each simple frequency in the signal.
In the discrete time case, the above integrals can be approximated as the sum of the sampled function values at, say, N points, multiplied by the sampling interval (1 / N).
The amplitude and phase computations continue to apply.
The amplitude An and phase Φn of a simple wave with integer frequency n in a discrete signal x(k) defined over a period from 0 to 1 are
where, for some uniform samples k = 0, 1, …, N
One important question remains. We can perform the operations above for complex signals x(k) consisting of simple waves with integer frequencies. Not all complex signals, however, consist of simple waves of integer frequencies. Perhaps not all complex signals consist of simple sine and cosine waves to begin with. We do not know whether practical signals resemble sine and cosine waves in any way. As it turns out, whether or not practical signals are the sums of simple sine and cosine waves is not important.
In 1807 Joseph Fourier shows that any periodic function f(x) with a period of 2π that is integrable over [-π, π] can be approximated with a (potentially infinite) linear sum of sine and cosine waves as follows.
This sum is called the Fourier series of the function f(x). The Fourier series does not always converge and does not always approximate f(x) at every point.
The coefficients Bn and Cn are computed with the integrals
Shifting by π and replacing x with x = 2π t, we can obtain a similar result, namely that a continuous signal x(t) can be approximated with a sum of sine and cosine functions of 2π t over the interval from 0 to 1. We can also produce a similar result in the discrete case.
Thus, whether or not a practical signal is composed of sine and cosine waves, is not important. Within a given interval, we can approximate the signal with a sum of sine and cosine waves similar to the sum we have been using so far.
Frequency content of an example complex signal
Take a complex signal that is the sum of the simple waves at 10 Hz, 25 Hz, and 50 Hz with amplitude of 1, 0.8 and 0.9 respectively. Suppose that we have the values of the signal sampled with some sampling frequency fs, and nothing else. If we compute the amplitude of various frequencies in the frequency spectrum in this signal using the formulae above over the interval from zero to 1 (from sample 0 to the sampling frequency, thus setting N = fs in these equations), we will obtain the graph in the figure below.
We know that simple waves at integer frequencies are orthogonal and so the result is expected. The graph is misleading, however, since we have done nothing about non-integer frequencies. Simple waves at non-integer frequencies are not orthogonal to the simple waves included in the signal for the chosen interval.
The blue line in the figure below shows the frequency content of the signal at non-integer frequencies around 25 Hz. As expected, the content of non-integer frequencies is not necessarily zero. These functions are not orthogonal to the simple waves of the signal in the selected interval. We can, however, make one important observation. Simple waves at non-integer frequencies are orthogonal to simple waves at integer frequencies for properly selected intervals. The simple waves at 5 Hz and 5.5 Hz, for example, are orthogonal in the interval from 0 to 4π, rather than from 0 to 2π as in our previous computations. Thus, we should be able to improve the computation of the frequency content, if we use longer intervals. The red line in the figure below shows the frequency content of the signal around 25 Hz, computed in the interval from zero to twice the sampling frequency. As expected, when doubling the interval, we will also get zero for the frequencies 22.5 Hz, 23.5 Hz, and so on.
Root mean square (RMS) amplitude of a simple wave
The RMS amplitude of a simple wave x(k) = cos(2π f k / fs) with frequency f over the interval from 0 to fs is
This is so because a simple cosine wave has a Fourier series expansion that is itself and Bn = 1. The result is the same for a simple sine wave.