Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.341:DISCRETE-TIME SIGNAL PROCESSING OpenCourseWare 2006 Lecture 17 Spectral Analysis with the DFT Reading:Sections 10.1 and 10.2 in Oppenheim,Schafer Buck (OSB). One of the important tools in signal processing is spectral analysis,i.e.examining the frequency content in a signal.For example,in order to design the whitening filters for matched filtering or Wiener filtering,we need to measure the power spectral density of a noise process. The two major applications of the DFT are implementing linear convolution,which we covered in the last lecture,and performing spectral analysis of a signal.OSB Figure 10.1 shows the basic steps of applying the DFT to continuous-time signals. First,an anti-aliasing lowpass filter is required to minimize the effect of aliasing because a signal is not perfectly band-limited,as shown in OSB Figure 10.2(a).The frequency response of an anti-aliasing filter and output of the filter are illustrated in OSB Figure 10.2(b)and(c), respectively.The conversion of a continuous signal to a discrete-time sequence corresponds to periodic replication and frequency normalization in the frequency domain as shown in OSB Figure 10.2(d). Since the DFT can not be applied to an infinite length signal,we need to multiply the sequence x[n]with a finite-duration window wn]as indicated in OSB Figure 10.1.This procedure results in a periodic convolution in the frequency domain,i.e. l=v)=云厂Xewe- OSB Figure 10.2(e)illustrates the Fourier transform of a typical window sequence,and the continuous curve in OSB Figure 10.2(f)shows the periodic convolution of W(ej)with X(ej). Notice that the convolution process smooth sharp peaks and discontinuities in X(e).The last step is computing the DFT of the finite-length sequence vn,which corresponds to sampling the DTFT.OSB Figure 10.2(f)also shows V[k]as samples of V(eiw).Since the spacing between the samples is 2/N and the relationship between the continuous-time frequency n and the normalized discrete-time frequency w is w=OT,the DFT corresponds to the continuous-time frequencies 2mk/NT. 1
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.341: Discrete-Time Signal Processing OpenCourseWare 2006 Lecture 17 Spectral Analysis with the DFT Reading: Sections 10.1 and 10.2 in Oppenheim, Schafer & Buck (OSB). One of the important tools in signal processing is spectral analysis, i.e. examining the frequency content in a signal. For example, in order to design the whitening filters for matched filtering or Wiener filtering, we need to measure the power spectral density of a noise process. The two major applications of the DFT are implementing linear convolution, which we covered in the last lecture, and performing spectral analysis of a signal. OSB Figure 10.1 shows the basic steps of applying the DFT to continuous-time signals. First, an anti-aliasing lowpass filter is required to minimize the effect of aliasing because a signal is not perfectly band-limited, as shown in OSB Figure 10.2(a). The frequency response of an anti-aliasing filter and output of the filter are illustrated in OSB Figure 10.2(b) and (c), respectively. The conversion of a continuous signal to a discrete-time sequence corresponds to periodic replication and frequency normalization in the frequency domain as shown in OSB Figure 10.2(d). Since the DFT can not be applied to an infinite length signal, we need to multiply the sequence x[n] with a finite-duration window w[n] as indicated in OSB Figure 10.1. This procedure results in a periodic convolution in the frequency domain, i.e. v[n] = x[n]w[n] V (ejω) = 1 � π X(ejθ)W(ej(ω−θ) ↔ )dθ. 2π −π OSB Figure 10.2(e) illustrates the Fourier transform of a typical window sequence, and the continuous curve in OSB Figure 10.2(f) shows the periodic convolution of W(ejω) with X(ejω). Notice that the convolution process smooth sharp peaks and discontinuities in X(ejω). The last step is computing the DFT of the finite-length sequence v[n], which corresponds to sampling the DTFT. OSB Figure 10.2(f) also shows V [k] as samples of V (ejω). Since the spacing between the samples is 2π/N and the relationship between the continuous-time frequency Ω and the normalized discrete-time frequency ω is ω = ΩT, the DFT corresponds to the continuous-time frequencies Ωk = 2πk/NT. 1
In order to interpret the result of the system accurately,we need to understand the artifact introduced in each step.In this lecture,we will focus on the effects of windowing and frequency sampling The Effect of Windowing As discussed in the previous page,the Fourier transform of a windowed signal corresponds to the periodic convolution of the Fourier transform of the window with the Fourier transform of the original signal.Due to the side lobe structure of a typical window,the convolution results in leakage of one frequency component into another component.In addition,the main lobe of a window is responsible for smearing frequency components and thus reducing frequency resolution.This effect of windowing is illustrated in OSB Example 10.3. In order to increase frequency resolution,we need to make the main lobe of the window as narrow as possible,and to reduce the leakage,the side lobe height as small as possible.OSB Figure 10.4(a)shows Kaiser windows for different values of B,and OSB Figure 10.4(b)shows the Fourier transforms corresponding to the windows in (a).We can see that as B increases, the main-lobe width increases and the side-lobe amplitude reduces.If we fix the value of B,and increase the length of the window,then both the main-lobe width and the side-lobe amplitude decreases,as illustrated in OSB Figure 10.4(c).However,increasing the window length requires a longer DFT,which results in more computation. The Effect of Spectral Sampling The DFT V[k]are samples of V(e),and it can sometimes produce misleading results.One common illusion from spectral sampling is the picket fence effect illustrated in OSB Example 10.4and10.5. Notice that from the OSB Figure 10.5(d),it is hard to interpret the spectrum of v[n]and this can lead to the illusion that the two frequency components are relatively same. However,this does not mean that the DTFT plot in OSB Figure 10.5(f)has higher frequency resolution than the DFT plot in OSB Figure 10.5(d).Since we can recover v[n]perfectly from VIk]using the IDFT,we didn't lose any information by taking the 64-point DFT of vn].In fact,the DTFT plot in OSB Figure 10.5(f)is not exactly drawn from the computation of the DTFT,because as we learned in the last lecture.the DTFT has values for an infinite number of frequency components,and thus can not be computed.As illustrated in OSB Example 10.7, a DTFT plot can be drawn by zero padding vn]and increasing the length of the DFT. Example: Consider the sum of two sinusoids given in OSB Example 10.5.The 64-point DFT shown in OSB Figure 10.6(b)has strong spectral lines at the frequencies of the two sinusoidal 2
In order to interpret the result of the system accurately, we need to understand the artifact introduced in each step. In this lecture, we will focus on the effects of windowing and frequency sampling. The Effect of Windowing As discussed in the previous page, the Fourier transform of a windowed signal corresponds to the periodic convolution of the Fourier transform of the window with the Fourier transform of the original signal. Due to the side lobe structure of a typical window, the convolution results in leakage of one frequency component into another component. In addition, the main lobe of a window is responsible for smearing frequency components and thus reducing frequency resolution. This effect of windowing is illustrated in OSB Example 10.3. In order to increase frequency resolution, we need to make the main lobe of the window as narrow as possible, and to reduce the leakage, the side lobe height as small as possible. OSB Figure 10.4(a) shows Kaiser windows for different values of β, and OSB Figure 10.4(b) shows the Fourier transforms corresponding to the windows in (a). We can see that as β increases, the main-lobe width increases and the side-lobe amplitude reduces. If we fix the value of β, and increase the length of the window, then both the main-lobe width and the side-lobe amplitude decreases, as illustrated in OSB Figure 10.4(c). However, increasing the window length requires a longer DFT, which results in more computation. The Effect of Spectral Sampling The DFT V [k] are samples of V (ejω), and it can sometimes produce misleading results. One common illusion from spectral sampling is the picket fence effect illustrated in OSB Example 10.4 and 10.5. Notice that from the OSB Figure 10.5(d), it is hard to interpret the spectrum of v[n] and this can lead to the illusion that the two frequency components are relatively same. However, this does not mean that the DTFT plot in OSB Figure 10.5(f) has higher frequency resolution than the DFT plot in OSB Figure 10.5(d). Since we can recover v[n] perfectly from V [k] using the IDFT, we didn’t lose any information by taking the 64-point DFT of v[n]. In fact, the DTFT plot in OSB Figure 10.5(f) is not exactly drawn from the computation of the DTFT, because as we learned in the last lecture, the DTFT has values for an infinite number of frequency components, and thus can not be computed. As illustrated in OSB Example 10.7, a DTFT plot can be drawn by zero padding v[n] and increasing the length of the DFT. Example: Consider the sum of two sinusoids given in OSB Example 10.5. The 64-point DFT shown in OSB Figure 10.6(b) has strong spectral lines at the frequencies of the two sinusoidal 2
components and no frequency contents at the other DFT values If we are considering a periodic signal with period 64,then our signal is the sum of two pure sinusoidal sequences,and thus the clean appearance of the DFT correctly shows the expected spectrum.However,since we are considering a finite-length sequence,the DFT figure can lead to an illusion resulting from the sampling of the spectrum.As shown in OSB Figure 10.6(c),the Fourier transform of vn]has significant content at almost all frequencies but is exactly zero at the frequencies that are sampled by the DFT.Therefore,interpreting the spectrum based only on the 64-point DFT figure is quite misleading. In order to avoid the above illusion we can take finer sampling of the DTFT.First,we extend vn]by zero-padding to obtain a 128-point sequence,and then take a 128-point DFT,which is shown in OSB Figure 10.7.Now it becomes apparent that the spectrum has significant content at other frequencies. OSB Example 10.6 illustrates the effect of different choices for the window.If we reduce the length of a window,the main-lobe width is increased,as illustrated in OSB Figure 10.4(c).This means that frequency resolution is reduced,which is apparent from OSB Figure 10.8(b)and (d).The two frequency components clearly resolved in (b)overlap each other in (d)and we do not see two distinct peaks. A common misconception is that more zero padding results in better spectral resolution.How- ever,zero padding and increasing the size of the DFT does not lead to better resolution,as illustrated in OSB Example 10.7.Notice that increasing the DFT size by zero-padding results in finer frequency spacing but does not change the ability to resolve the two frequency components. In order to achieve better frequency resolution,we need to change the length and shape of the window.OSB Example 10.8 illustrates this.In OSB Figure 10.10,as the window length increases,we see improvements in our ability to distinguish the two frequency components,and the relative amplitude of the two components becomes closer to the correct value. 3
components and no frequency contents at the other DFT values. If we are considering a periodic signal with period 64, then our signal is the sum of two pure sinusoidal sequences, and thus the clean appearance of the DFT correctly shows the expected spectrum. However, since we are considering a finite-length sequence, the DFT figure can lead to an illusion resulting from the sampling of the spectrum. As shown in OSB Figure 10.6(c), the Fourier transform of v[n] has significant content at almost all frequencies but is exactly zero at the frequencies that are sampled by the DFT. Therefore, interpreting the spectrum based only on the 64-point DFT figure is quite misleading. In order to avoid the above illusion we can take finer sampling of the DTFT. First, we extend v[n] by zero-padding to obtain a 128-point sequence, and then take a 128-point DFT, which is shown in OSB Figure 10.7. Now it becomes apparent that the spectrum has significant content at other frequencies. OSB Example 10.6 illustrates the effect of different choices for the window. If we reduce the length of a window, the main-lobe width is increased, as illustrated in OSB Figure 10.4(c). This means that frequency resolution is reduced, which is apparent from OSB Figure 10.8(b) and (d). The two frequency components clearly resolved in (b) overlap each other in (d) and we do not see two distinct peaks. A common misconception is that more zero padding results in better spectral resolution. However, zero padding and increasing the size of the DFT does not lead to better resolution, as illustrated in OSB Example 10.7. Notice that increasing the DFT size by zero-padding results in finer frequency spacing but does not change the ability to resolve the two frequency components. In order to achieve better frequency resolution, we need to change the length and shape of the window. OSB Example 10.8 illustrates this. In OSB Figure 10.10, as the window length increases, we see improvements in our ability to distinguish the two frequency components, and the relative amplitude of the two components becomes closer to the correct value. 3