Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lec.6:Discrete Fourier Transform and Signal Spectrum

Similar presentations


Presentation on theme: "Lec.6:Discrete Fourier Transform and Signal Spectrum"— Presentation transcript:

1 Lec.6:Discrete Fourier Transform and Signal Spectrum
By: Assistant Professor Maha George Zia Lec.6:Discrete Fourier Transform and Signal Spectrum Maha George Zia Assistant Professor Electrical Engineering Department

2 By: Assistant Professor Maha George Zia
Outlines Discrete Fourier Transform (DFT) Fourier Series Coefficients of Periodic Digital Signals Discrete Fourier Transform Formulas DFT IDFT Frequency resolution Amplitude Spectrum and Power Spectrum

3 Discrete Fourier Transform(DFT)
By: Assistant Professor Maha George Zia Discrete Fourier Transform(DFT) In time domain, representation of digital signals describes the signal amplitude versus the sampling time instant or the sample number. However, in some applications, signal frequency content is very useful otherwise than as digital signal samples. The representation of the digital signal in terms of its frequency component in a frequency domain is called the signal spectrum. Fig.1 illustrates the time domain representation of a 1,000-Hz sinusoid with 32 samples at a sampling rate of 8,000 Hz; and the signal spectrum (frequency domain representation),where the amplitude peak is located at the frequency of 1,000 Hz in the calculated spectrum. Hence, the spectral plot better displays frequency information of a digital signal.

4 By: Assistant Professor Maha George Zia
The algorithm transforming the time domain signal samples to the frequency domain components is known as the discrete Fourier transform, or DFT DFT is widely used in many other areas, including spectral analysis, acoustics, imaging/video, audio, instrumentation, and communications systems. Fig.1 A digital signal and its amplitude spectrum

5 Fourier Series Coefficients of Periodic Digital Signals
By: Assistant Professor Maha George Zia Fourier Series Coefficients of Periodic Digital Signals To estimate the spectrum of a periodic digital signal x(n) sampled at a rate of fs Hz with the fundamental period T0 = NT, as shown in Fig.2, where there are N samples within the duration of the fundamental period and T= 1/fs is the sampling period. Assuming that the periodic digital signal is band limited to have all harmonic frequencies less than the folding frequency fs/2 so that aliasing does not occur. Fig.2 Periodic digital signal

6 By: Assistant Professor Maha George Zia
Fourier series expansion of a periodic signal x(t) in a complex form is: where k is the number of harmonics corresponding to the harmonic frequency of kf0 and w0 = 2π/T0 and f0 = 1/T0 are the fundamental frequency in radians per second and the fundamental frequency in Hz, respectively. To apply Eq.(1), T0 = NT, w0 = 2π/T0 are substituted then approximate the integration over one period using a summation by substituting dt = T and t = nT. (1) (2)

7 By: Assistant Professor Maha George Zia
Since the coefficients ck are obtained from the Fourier series expansion in the complex form, the resultant spectrum ck will have two sides. Therefore, the two-sided line amplitude spectrum |ck | is periodic as shown in Fig.3. Fig.3 Amplitude spectrum of the periodic digital signal

8 By: Assistant Professor Maha George Zia
Notes: A) Only the line spectral portion between the frequency -fs/2 and frequency fs/2 (folding frequency) represents the frequency information of the periodic signal. B) The spectrum is periodic for every N f0 (Hz). C) For the kth harmonic, the frequency is f = kf0 (Hz). f0 is called the frequency resolution Q1. The periodic signal is sampled using the rate fs = 4 Hz. a. Compute the spectrum ck using the samples in one period. b. Plot the two-sided amplitude spectrum |ck | over the range from -2 to 2 Hz. Solution:

9 By: Assistant Professor Maha George Zia
a) The fundamental frequency w0 = 2π radians per second and f0 = 1 Hz, and the fundamental period T0 = 1 sec. Since using the sampling interval T = 1/fs = 0:25 sec, the sampled signal is: The plot the first eight samples as shown in Fig.4.Choosing the duration of one period, N = 4, we have the sample values as follows: For convenience, the spectrum over the range from 0 to fs Hz is computed with nonnegative indices, that is, (3)

10 By: Assistant Professor Maha George Zia
Then It follows that b) Two-sided spectrum for the periodic digital signal

11 Discrete Fourier Transform (DFT) Formulas
By: Assistant Professor Maha George Zia Discrete Fourier Transform (DFT) Formulas Fig. 4 shows development of DFT formula Fig.4 development of DFT formula

12 By: Assistant Professor Maha George Zia
Given a sequence x(n), 0 < n < N 1, its DFT is defined as: where the factor WN (called the twiddle factor) is defined as: The inverse DFT is given by: (4) (5) (6) MATLAB functions fft() and ifft() are used to compute the DFT coefficients

13 By: Assistant Professor Maha George Zia
Q2. Given a sequence x(n) for 0 ≤ n ≤ 3, where x(0) = 1, x(1) = 2, x(2) =3, and x(3) = 4. Evaluate its DFT X(k). Solution: Since N = 4 and W4 = e-jπ/2 , using Eq. (4):

14 By: Assistant Professor Maha George Zia

15 By: Assistant Professor Maha George Zia
Q3.Using the DFT coefficients X(k) for 0 ≤ k ≤ 3 computed in Example 2. Evaluate its inverse DFT to determine the time domain sequence x(n). Solution: Since N = 4 and W4 = e-jπ/2 , using Eq. (6):

16 By: Assistant Professor Maha George Zia

17 By: Assistant Professor Maha George Zia
using the MATLAB function fft() for Ex.2: X = fft([ ]) X = i i Applying the MATLAB function ifft() for Ex.3 achieves: x = ifft([ j j]) x = The relationship between the frequency bin k and its associated frequency w (rad/sec) or f (Hz) is: Where ws = 2 π fs (rad/sec) (7)

18 By: Assistant Professor Maha George Zia
The frequency resolution is the frequency step between two consecutive DFT coefficients used to measure how fine the frequency domain presentation is and achieve Q4. In Ex.2, if the sampling rate is 10 Hz, A. Determine the sampling period, time index, and sampling time instant for a digital sample x(3) in time domain. B. Determine the frequency resolution, frequency bin number, and mapped frequency for each of the DFT coefficients X(1) and X(3) in frequency domain. Solution: A) (8) The time index is n = 3

19 By: Assistant Professor Maha George Zia
B) The frequency resolution is: The frequency bin number for X(1) should be k = 1 and its corresponding frequency is determined by: Similarly, for X(3) and k = 3,

20 Amplitude Spectrum and Power Spectrum
By: Assistant Professor Maha George Zia Amplitude Spectrum and Power Spectrum One of the DFT applications is transformation of a finite-length digital signal x(n) into the spectrum in frequency domain. Fig.5 demonstrates such an application, where Ak and Pk are the computed amplitude spectrum and the power spectrum, respectively, using the DFT coefficients X(k). Fig. 5 Applications of DFT/FFT.

21 By: Assistant Professor Maha George Zia
First, we achieve the digital sequence x(n) by sampling the analog signal x(t) and truncating the sampled signal with a data window with a length T0 =NT, where T is the sampling period and N the number of data points. The time for data window is Second, applying eq. (4) to calculate the DFT of the sequence, x(n). The amplitude spectrum is: The amplitude spectrum is modified to a one-sided amplitude spectrum as (9) (10) (11)

22 By: Assistant Professor Maha George Zia
Third, using eq.(7) . Fourth, the phase spectrum is given by: Besides the amplitude spectrum, the power spectrum is also used. The DFT power spectrum is defined as Similarly, a one-sided power spectrum is defined as: (12) (13) (14)

23 By: Assistant Professor Maha George Zia
Q5. consider the sequence Assuming that fs = 100 Hz, Compute the amplitude spectrum, phase spectrum, and power spectrum. Solution: Since N = 4, and using the DFT obtained in Ex.2 : X(0) = 10, X(1) = -2+ j 2, X(2) = -2, X(3) = -2-j 2 Using equations (10, 12, 13):

24 By: Assistant Professor Maha George Zia
And Similarly:

25 By: Assistant Professor Maha George Zia
Thus, the sketches for the amplitude spectrum, phase spectrum, and power spectrum are given in the below figures:

26 By: Assistant Professor Maha George Zia
One-sided amplitude spectrum and one-sided power spectrum are calculated using equations (11,14) as: Only, one-sided amplitude spectrum is plotted for comparison:

27 By: Assistant Professor Maha George Zia
Typical questions Q1.Define frequency resolution. Q2. Given a sequence x(n) for 0≤n ≤ 3, where x(0) = 1, x(1) = 1, x(2) = -1, and x(3) = 0. Evaluate its DFT X(k). Check your result using MATLAB function Q3. Consider a digital sequence sampled at the rate of 20,000 Hz. If we use the 8,000-point DFT to compute the spectrum, determine a. the frequency resolution b. the folding frequency in the spectrum Q4. Given a DFT X(K) for 0≤ k ≤ 3, where X(0) = 3, X(1) = -1+, X(2) = -1, and X(3) = -1-j1. Evaluate its x(n). Check your result using MATLAB function

28 By: Assistant Professor Maha George Zia
Q5 For the figure shown above, assuming that fs = 100 Hz, compute and plot the amplitude spectrum, phase spectrum, and power spectrum . Repeat for one sided spectrums too.


Download ppt "Lec.6:Discrete Fourier Transform and Signal Spectrum"

Similar presentations


Ads by Google