2.5 Fourier Transforms and Series
The transforms in this section adopt eternal (infinite duration) sinusoids as basis functions and complement the DFT, which uses finite-length basis functions. For mathematical convenience, complex exponentials are also used given that they conveniently represent sinusoids.
Using sinusoids as basis functions is very useful in many applications. Depending on the type of signal to be analyzed, there are four pairs of analysis and synthesis transform equations that adopt eternal sinusoids as basis functions. These four pairs can be collectively called Fourier analysis tools and are discussed in the sequel.
The reason for not having only one transform pair when dealing with Fourier analysis is that two properties of the signal to be analyzed must be taken in account: whether the signal is continuous or discrete in time, and periodic or non-periodic. Covering all possible combinations, Table 2.3 lists the four pairs of equations to conduct Fourier analysis with eternal sinusoids (later we will discuss the DFT, which is used for finite-duration signals).
Continuous-time | Discrete-time |
|
Fourier series (FS) | Discrete-time Fourier series (DTFS) |
|
Periodic |
|
|
|
|
|
or |
|
|
|
|
|
Fourier transform (FT) | Discrete-time Fourier transform (DTFT) |
|
Non-periodic |
|
|
|
|
|
or |
|
|
|
|
It can be seen from Table 2.3 that the terminology series is used when the signal to be analyzed is periodic. In this case the spectrum is discrete in frequency and represented by coefficients or . Obtaining a Fourier series is a special case of the general procedure of representing a function (in this case, a periodic signal) via a series expansion such as Taylor’s, Laurent’s, etc. In contrast, the spectrum of non-periodic signals is continuous in frequency and the tools to analyze non-periodic signals are called transforms. Note this nomenclature is not 100% consistent with block transforms in the sense that the DFT, which has a discrete spectrum, is called “transform”.
As highlighted in Table 2.4, in Fourier analysis, there is an interesting and maybe not evident duality between the time and frequency domains: periodicity in one domain leads to a discrete function in the other domain, while non-periodicity leads to a continuous function. For example, Table 2.4 shows that the spectrum of a discrete-time signal is always periodic.
Continuous-time | Discrete-time |
|
Periodic | Fourier series | Discrete-time Fourier series (DTFS) |
Basis: | Basis: |
|
non-periodic, discrete | periodic, discrete |
|
Non-periodic | Fourier transform | Discrete-time Fourier transform (DTFT) |
Basis: | Basis: |
|
non-periodic, continuous | periodic, continuous |
Table 2.4 and Table 2.3 indicate that the DTFS is the only pair that has discrete signals in both domains, time and frequency. This indicates that the DTFS is related to the DFT. In fact, the DFT and DTFS are mathematically equivalent in case , with the exception of the normalization factor in Eq. (2.11). But their interpretation has a remarkable distinction: The basis functions of the block transform DFT in Eq. (2.11) are finite-duration sequences or, equivalently, vectors, with dimension , while the basis functions of the DTFS are infinite-duration complex exponentials of period . Hence, the DTFS and DFT are more naturally interpreted and used for (infinite-duration) periodic and finite-duration signals, respectively.
Another reason for keeping their names different is that the DFT (via FFT algorithms) is often used in computers, digital oscilloscopes, spectrum analyzers, etc., to analyze non-periodic and even continuous-time signals that were digitized. Hence, there are aspects that must be studied to apply DFT in these cases, such as the relation between an original spectrum of a continuous-time signal and , the one obtained by the DFT of its discrete-time version. Therefore, in spite of the operations in DTFS and DFT being mathematically equivalent apart from a normalization constant, it is convenient to restrict the discussion of DTFS to the analysis of periodic and discrete-time signals and call DFT the tool for finite-duration signals, which in practice is used for analyzing any digitized signal.
Besides their relation to the DFT, there are many other similarities and relations within the four Fourier pairs in Table 2.4 themselves. For example, transforms are meant for non-periodic signals but, as discussed in Appendix A.26.2, impulses can be used to also represent periodic signals via a transform (instead of a series). The next sections will discuss some of these relations.
One point that will not be explored in this text is the important aspect of convergence. Similar to the fact that a vector outside the span of a given basis set cannot be perfectly represented by the given basis vectors, there are signals that cannot be represented by Fourier transforms or series. In other words, the transform/series may not converge to a perfect representation even when using an infinite number of basis functions. A related aspect is the well-known Gibbs phenomenon: when the signal has discontinuities (such as at ), the Fourier representation has to use an infinite number of basis functions. Any truncation of this number (i. e., using a finite number of basis functions) leads to ripples in the reconstructed signal. Given the adopted emphasis in the engineering application of transforms, this text assumes the signals are well-behaved and the transforms and series properly converge.
Complementing Table 2.3, Table 2.5 indicates the assumed units when the signals in time domain are given in volts and is useful to observe the difference for continuous and discrete spectra.
Continuous-time | Discrete-time |
|
x(t) in volts | x[n] in volts |
|
Periodic | Fourier series | Discrete-time Fourier series (DTFS) |
(volts) | (volts) |
|
Fourier transform | Discrete-time Fourier transform (DTFT) |
|
Non-periodic | (volts/Hz) | (volts/radians) |
2.5.1 Fourier series for continuous-time signals
The Fourier series for a continuous-time signal uses an infinite number of complex harmonic sinusoids as basis functions. These functions allow to represent any periodic signal with period (i. e., ), where (rad/s). The frequency in Hz (or in rad/s) is called the fundamental frequency.
Advanced: On the orthogonality of sinusoids
The results in this subsection are useful for proving Fourier pairs. They can be eventually skipped in case the mathematical proofs based on the orthogonality of sinusoids are not of interest at this moment.
Result 2.1. Eternal (infinite-duration) sinusoids at different frequencies are orthogonal. If , then
Proof: To simplify notation, let and . From Eq. (A.11):
First let us assume that the interval from to corresponds to an integer number of periods for both and . In this case, it is easy to see that the following result is zero:
unless (in this case ). But the astute reader may be concerned that the range does not necessarily represent an integer number of periods. In fact, using the reasoning that we adopt for finite-duration signals, we should have the integral interval (recall the concept of commensurate frequencies in Example 1.16) corresponding to a multiple of the periods of and . But things are different when the integral interval has infinite duration. In this case, a sinusoid alternates between positive and negative values, and over an infinite interval, the areas under these positive and negative sections cancel each other out. As a result, the integral converges to zero. In spite of not being rigorously stated, this result is important to understand the proof of the expression for the Fourier transform (see, e. g., Section 2.5.3).
Result 2.2. Cosine and sine at the same frequency are orthogonal. Similar to Example 2.1, it can be shown that:
which used Eq. (A.5).
The following result is useful when the integration interval is the fundamental period or a multiple of .
Result 2.3. Harmonic sinusoids are orthogonal when the inner product (integral) is over a time interval multiple of the fundamental period. If is the fundamental frequency in rad/s and , then
Proof: Note that the sinusoids are assumed here to be eternal, but the result is also valid in case they have a finite-duration coinciding with the time duration of the integral. From Eq. (A.11):
The cosine with angular frequency of the second parcel has a period and its integral over is zero, because is an interval corresponding to an integer number of periods . The same reasoning can be applied to the cosine with angular frequency with period , which is especially easy to observe when . If , because , the cosine argument of the first parcel can be changed to to help concluding that this integral over is also zero.
Result 2.4. On the energy of Fourier basis functions. Example 2.3 proves that the Fourier series basis functions are orthogonal. But they are not orthonormal and the energy over a duration is
which is the normalization factor that will appear in the Fourier series equations, similar to the result for block transforms in Eq. (2.25).
Result 2.5. Proof of the Fourier series pair. One can use the reasoning in Theorem 4 (page 2022) to prove the Fourier series equations. Writing the synthesis equation
is similar to . Calculating is therefore equivalent to the inner product between and the -th basis function , which is written as:
(recall from Table 2.2 that the inner product is defined with the complex conjugate of the second argument when the signals are complex). Due to the properties of the inner product one can write
| (2.26) |
The last step is due to the orthogonality of the basis functions:
In summary, the previous steps used the basis functions orthogonality to prove that the analysis equation
corresponds to using the inner product as in Theorem 4 (page 2022), and taking in account that here the basis functions have an energy .
Fourier series using complex exponentials
Looking at Table 2.3, the basis , corresponding to in a Fourier series, is responsible for representing the DC level of . All other basis functions have a frequency
When , frequencies higher than are generated and, consequently, a period that is smaller than . Therefore, all basis functions but the one for are periodic in . The frequencies that obey a relation with respect to a fundamental frequency are called harmonics. The frequency is called the second harmonic, is the third harmonic and so on.
It seems intuitive that Fourier series should not be used to represent non-periodic signals. In fact, the basis functions even depend on the period of the signal to be analyzed. On the other hand, because the signal is periodic, it suffices to find coefficients that represent the signal during a single period. The trick is then to use these coefficients (obtained with inner products of duration ) to multiply eternal complex exponentials and properly represent the periodic (and consequently infinite-duration) . Hence, the Fourier series pair is:
| (2.27) |
The negative frequencies exist for mathematical convenience. They allow, for example, to represent a cosine as a sum of complex exponentials with “positive” and “negative” frequencies as in Eq. (A.2).
Example 2.14. Basis functions of Fourier series. Figure 2.11 shows four basis functions for analyzing signals with period seconds. Note that the basis for is a real signal while the others are complex. The basis for has the same real part of the one for and the negative of the imaginary part. This is due to the fact that cosines are even functions while sines are odd functions (see Section 1.6.1).
Similar to the DFT case discussed in Section 2.4.3.0, when the Fourier series is used to analyze a real signal , the symmetry of the basis functions for and leads to interesting properties for the coefficients: the real part of and their magnitude compose even sequences while the imaginary part and their phase compose odd sequences. In summary, for real signals : , , and . These properties can be written compactly as
| (2.28) |
which corresponds to Hermitian symmetry for the Fourier series, as for the DFT in Section 2.4.3.0. In fact, the properties based on the symmetry of the basis functions and, eventually, also of the signal to be analyzed ( in this case), are valid not only for Eq. (2.27) but for other Fourier pairs.
Another aspect due to the symmetry is often invoked: because any signal can be decomposed as the sum of an even part and an odd part (see Section 1.6.1), the cosines are in charge of representing , while the sines represent . This leads to conclusions such as: if is real and even, then .
Figure 2.12 shows the Fourier coefficients for the periodic and real-valued signal , with fundamental period s. The graphs in Figure 2.12 are called the spectrum of the signal. Because the coefficients are in general complex numbers, a spectrum is represented using the polar or rectangular form of complex numbers. Figure 2.12 uses the polar format. One can notice that, because is real, , i. e., the spectrum presents the Hermitian symmetry of Eq. (2.28).
Example 2.15. Continuous-time Fourier series coefficients by inspection. When the periodic signal is composed by a sum of sines and cosines, it is convenient to obtain the Fourier series coefficients by inspection. For example, assume the signal of Figure 2.12. Using Euler’s, one has
and
Hence, the only non-zero coefficients are , , , , , with as indicated in Figure 2.12, which shows the magnitude and phase graphs of the Fourier series coefficients for representing .
Trigonometric Fourier series
Instead of complex exponentials with negative frequencies as in Eq. (2.27), the Fourier series can be written in terms of cosines and sines with positive frequencies only. In this case, one has a set of coefficients for the cosines and another set for the sines that are usually called and , respectively, and related as follows:
| (2.29) |
Comparing the expression for in Eq. (2.27) and Eq. (2.29), they are related via Euler’s formula (see Eq. (A.1))
This allows to write and, for :
Eq. (2.29) is called the trigonometric Fourier series while Eq. (2.27) is the exponential version.
Example 2.16. Bilateral and unilateral spectrum representations.
The spectrum of Figure 2.12 is called bilateral because the negative frequencies are explicitly represented. In this case, a sinusoid of amplitude is represented by a pair of coefficients with magnitudes each. An alternative representation, valid only for real signals, is the unilateral spectrum, where only are shown. In this case, and as illustrated in Figure 2.13. This text emphasizes the bilateral representation because it is more general and capable of representing the spectrum of a complex-valued signal .
2.5.2 Discrete-time Fourier series (DTFS)
The Fourier series for discrete-time signals is used to analyze a periodic signal with fundamental period . Similar to the continuous-time case, the basis functions consist of a set of complex exponentials formed by a fundamental frequency and its harmonics. The basis corresponding to the fundamental frequency is , where radians, and the harmonics are . A major distinction between the DTFS and the Fourier series is that there are only distinct angular frequencies for the DTFS because
This is a consequence of the fact that discrete-time angular frequencies are angles. Hence, the basis function corresponding to a frequency is equal to the one corresponding to .
Hence, the DTFS pair is:
| (2.30) |
If convenient, Eq. (2.30) can be represented using the twiddle factor as in Table 2.3. The notation and represent any interval of consecutive integers, such as or . Note the basis functions depend on the period of the signal to be analyzed.
Because is periodic, it suffices to specify its samples in an interval . However, using and in Eq. (2.30) allows to indicate that is periodic and has an infinite duration (in contrast to the finite-duration sequence obtained by an inverse DFT), respectively. As indicated in Eq. (2.30), only values of are necessary to represent the periodic , and along the values are periodic, i. e., . The reason is that, as mentioned, the angles repeat after samples (as also illustrated by the divided unit circle in Figure 2.7) and, consequently, their corresponding basis functions and coefficients .
Similar to Example 2.15, which obtained the Fourier series of a continuous-time signal, when is composed by a sum of sinusoids, it is relatively easy to find the DTFS coefficients by inspection, as discussed next.
Example 2.17. DTFS coefficients by inspection. Assume , which has a period of samples. Instead of calculating via Eq. (2.30), one can rewrite the signal as a sum of complex exponentials:
With , the DTFS synthesis equation is:
where the range is chosen to be: , which leads to
By inspection, can be represented by two coefficients: and , while all other coefficients in the range are zero.
If the range were , it would be necessary to recall that . Hence, and the spectrum of could be represented by and with for and . An alternative view of this periodicity is to sum to the angle , which leads to and allows to write
Sometimes the graphs do not emphasize, but DTFS is always periodic and the Fourier coefficients repeat over with a period .
Calculating the DTFS via the DFT
As mentioned, mathematically the DFT and DTFS differ only by the scaling factor , as indicated in Eq. (2.20) and Eq. (2.30), respectively. Using the proper scaling factor will not alter the spectrum shape but it is important in case the numerical values should be interpreted with the correct units. For example, if a cosine is generated and its FFT calculated in Matlab/Octave, the numerical values will be influenced by both the cosine amplitude and value of . Only after the normalization by one can interpret the spectrum of a periodic signal in volts. The following example illustrates this procedure.
Example 2.18. DTFS using an FFT routine. Having a DFT routine, typically implemented as an FFT, one can obtain the forward DTFS by dividing the DFT spectrum by and, consequently, interpreting as the spectrum of a periodic signal.
Listing 2.2 illustrates how to calculate the DTFS in Matlab/Octave using both their built-in fft function and the companion ak_fftmtx.m, with X and X2 being the same apart from numerical errors around . Figure 2.14 shows the resulting spectrum.
1N=12; %period in samples 2n=transpose(0:N-1); %column vector representing abscissa 3Vp=10; x=Vp*cos(pi/6*n + pi/3); %cosine with amplitude 10 V 4X=(1/N)*fft(x);%calculate DFT and normalize to obtain DTFS 5A=ak_fftmtx(N,2); %DFT matrix with the DTFS normalization 6X2=A*x; %calculate the DTFS via the normalized DFT matrix
While DFT graphs typically show only the chosen range of coefficients as in Figure 2.14 and Figure 2.38, sometimes the periodicity of DTFS / DFT must be represented. Therefore, the strict representation of the spectrum of is given in Figure 2.15, which does not limit the abscissa to values of .
Note in the example of Figure 2.15 the value was chosen to coincide with the period of the cosine and the non-zero coefficients were . Choosing would move the non-zero coefficients to . If the number of points of the DFT / DTFS was not a multiple of 12, would still be interpreted as a periodic signal but not a single cosine. In this case the spectrum would have many non-zero coefficients.
As mentioned, all four pairs of Fourier representations are related. The two pairs of series have been discussed. One can obtain the expressions for transforms from expressions for series by using the limit when the period ( or ) goes to infinite. This allows to create an aperiodic signal from a periodic one, and also illustrates that the discrete components of the spectrum ( or ) get so close to each other that create a continuum of frequencies ( or ). The next sections discuss Fourier transforms.
2.5.3 Continuous-time Fourier transform using frequency in Hertz
The continuous-time Fourier transform11 uses an infinite number of exponentials as basis functions, where is the angular frequency in radians per second and varies from to . Recall from Result 2.1 that two exponentials and , , are orthogonal, and , where is the frequency in Hertz. Hence, the continuous-time Fourier equations are given by
| (2.31) |
One should interpret the coefficient for a given frequency as the inner product .
As anticipated in Table 2.5, if is given in volts, the unit of is volts seconds or, equivalently, volts/Hz. Similarly, for in ampere, is in ampere/Hz, and so on.
2.5.4 Continuous-time Fourier transform using frequency in rad/s
In some applications of Fourier transform, it is more convenient to use with in rad/s, instead of with in Hz.
Having as a convenient alternative to , where , is very different from deriving a new function by contracting the frequency axis by the factor (see, e. g., Figure 1.6). In case , the two functions and are different. In contrast, and represent the very same function, but with distinct independent variables. In summary, a plot of without impulses can be converted to by simply multiplying the abscissa by . But due to the scaling property of the impulse, the area of each eventual impulse in needs to be scaled by when representing it in . Some examples are provided in the sequel.
Example 2.19. Examples contrasting Fourier transforms in linear and angular frequencies As depicted in Figure 2.16, when there are no impulses in , the Fourier transform is obtained by simply multiplying the abscissa by .
However, when contains impulses, the scaling property of an impulse described in Appendix A.26.5.0 has to be taken into account. This property states that each area of an impulse in is multiplied by to become in . For example, the transform of is or, equivalently, . Figure 2.17 provides an example for .
It is instructive to compare Figure 2.16 and Figure 2.17, observing that and are two distinct representations of the same Fourier transform of the respective signal .
As a final example, consider that is the Fourier transform of a complex-valued signal . The spectrum does not have Hermitian symmetry because is not real-valued. When in rad/s is adopted, this spectrum is represented as . The amplitude of the function is 5 in both and , but the area of the impulse is scaled by in .
Because they represent the same spectrum, and share the same properties with few subtle differences imposed by the factor . If a given property is defined for one of these two functions (the “mother” definition for this property), an equivalent property can be derived for the other (“child” definition).
For instance, assume the Fourier transform given in Hertz is the “mother” definition described by Eq. (2.31). The “child” definition using rad/s instead of Hz, requires a change of variable to obtain the alternative Fourier transform definition:
| (2.32) |
Units of the Fourier transform in linear and angular frequencies
Table 2.5 indicated that, when is given in volts, the unit of is volts/Hz. The unit of is volts/(rad/s), and the need to incorporate the factor is better understood via an example.
For instance, when , the value is 5 V/Hz from Hz, and zero otherwise. The integral of is 20 volts, because:
Equivalently, this spectrum can be denoted as . The unit of is not directly in volts/(rad/s) because taking the value of 5 along the frequency band leads to
But using a normalization factor of , the function can be interpreted in units of rad/s. For the given example, one has a density of V/(rad/s), which leads to
Hence, the factor in Eq. (2.32) is essential for having the proper results and interpreting in units of volts/(rad/s). For example, for
| (2.33) |
2.5.5 Discrete-time Fourier transform (DTFT)
The discrete-time Fourier transform uses an infinite number of exponentials as basis functions, where is the angular frequency in radians. The equations are given by
| (2.34) |
If is given in volts, the unit of is volts per radians. For instance, assuming , the density is volts/rads over the frequency band rads, and one has
One should interpret the coefficient for a given frequency as the inner product .
The notation is because only appears in the imaginary part of an exponent, i. e., is always the angle of a complex exponential, unless is the argument of an impulse . For example, will never be a “valid” discrete-time Fourier transform for the signals of interest. In contrast, a “valid” expression is . One can also note that
which indicates that is always periodic in (for any ). This discreteness-periodicity duality had been already summarized in Table 2.4.
Calculating the DTFT via the DFT
The DFT corresponds to sampling the DTFT in the frequency domain such that
| (2.35) |
with being the DFT dimension. In other words, the DFT uses a frequency increment of and calculates the value of the DTFT at the angles rad.
The discrete-values of the angles used in an -point DFT are called DFT (or FFT) bins. Hence, in Fourier analysis, the number of bins coincides with the number of DFT / FFT points. Figure 2.18 depicts an example with . In this case, a cosine with angular frequency is called bin-centered because its frequency coincides with a DFT bin (also called DFT frequency line).12
Figure 2.18 has similarities to the histogram in Figure 1.21. For instance, for the DFT one can assume that the minimum and maximum angular frequencies are always and , respectively. Hence, the bin width can be calculated using a strategy similar to the one adopted in Eq. (1.15), as . However, the bin centers in histograms are calculated differently than DFT bin centers. A histogram with bins uses the minimum signal value as an edge of the first bin. In contrast, as indicated in Figure 2.18, the minimum angular frequency value rad is considered to be the first bin center (not the edge). Because of this, the first and last bins of a DFT/FFT have a width of , which differs from the other bins.
Another issue when using a DFT is to improve its resolution given by . When one wants to sample the DTFT using a high-resolution grid, the value is chosen to be larger than the duration of and zero-padding is adopted. Zero-padding corresponds to simply increasing the size of a sequence by appending extra values to it, all with zero amplitude.