Part5 - Discrete Fourier Transform and Signal Spectrum
Part5 - Discrete Fourier Transform and Signal Spectrum
Part5 - Discrete Fourier Transform and Signal Spectrum
Signal Spectrum
Discrete Fourier Transform
• signal spectrum:
representation of the digital
signal in terms of its
frequency component in a
frequency domain. Hence, the
spectral plot better displays
frequency information of a
digital signal.
• discrete Fourier transform
(DFT): The algorithm
transforming the time domain
signal samples to the
frequency domain
components.
• The DFT is widely used in
many other areas, including
spectral analysis, acoustics,
imaging/ video, audio,
instrumentation, and
communications systems. A 1,000-Hz sinusoid with 32 samples at a sampling
rate of 8,000 Hz.
Fourier Series Coefficients of Periodic Digital Signals
• Consider a periodic digital signal x(t) sampled at a rate of fs Hz with the
fundamental period T0 = NT, where there are N samples within the duration of the
fundamental period and T = 1/fs is the sampling period.
• According to Fourier series analysis, the coefficients of the Fourier series expansion
of a periodic signal x(t) in a complex form is:
x[N] =x[0]
Fourier Series Coefficients
• If substitute T0 = NT, ω0 = 2π/T0 and x[n] x[N+1] = x[1]
approximate the integration over one
period using a summation by x[1]
substituting dt = T and t = nT. We
obtain:
x[0]
x[n]
c e
j
and x[n] N
k
k
x[n] x[n]
so, for convenience, we compute the spectrum over the range from 0 to fs Hz with
nonnegative indices, that is:
x[n]
Fourier Series Coefficients
x[n]
x[1]
nT nT
x[n] sin(2f 0 nT ) sin(2 ) sin(2 ) x[2]
T0 NT x[0]
n n
sin(2 ) sin(2 ) sin(0.5n)
N 4 x[3]
x[n] x[n]
Example1, cont.
cn = cn+N = cn-N
below
x[n] x[N+1]=x[1]
x[1]
x[0]
x[N]=x[0]
x[N-1]
x[0]
Discrete Fourier Transform Formulas
x[n]
1 j 1
x[n] X [k ]e N X [k ]W N kn , n 0, 1,...........N 1
N k 0
N k 0
1
x[n] ( X [0]W N 0 n X [1]W N1n X [2]W N 2 n ... X [ N 1]W N ( N 1) n
N
Discrete Fourier Transform Formulas in matlab
• We can define the frequency resolution as the frequency step between two
consecutive DFT coefficients to measure how fine the frequency domain
presentation is and achieve
x[3]
X[1]
X[3]
Amplitude Spectrum Power Spectrum
• For the discrete sequence x[n] with a range of n = 0, 1, 2, . . . , N - 1, its N DFT
coefficients are: N 1 2kn N 1
j
X [k ]
n 0
x[n]e N
n 0
x[n]WNkn , k 0, 1,...........N 1
X[k]
x[n]
Amplitude Spectrum Power Spectrum
• Correspondingly, the phase spectrum is given by:
X[k]
X[k]
• Besides the amplitude spectrum, the power spectrum is also used. The DFT
power spectrum is defined as:
• Again, notice that the frequency resolution, which denotes the frequency
spacing between DFT coefficients in frequency domain, is defined as:
spectral density, power spectral density (PSD), or energy spectral density (ESD)
Example5: x[n]
• Solution:
– a. Since N = 4, and using the DFT shown in Example1, we find the
DFT coefficients to be:
X[0] = 10, X[1] = -2 + j2, X[2] = -2, and X[3] = -2 - j2
The amplitude spectrum, phase spectrum, and power density spectrum are
computed as follows:
For k = 0, f = k fs/N = 0 x 100/4 = 0 Hz,
X[0]
X[0]
X[0]
X[0]
Example5, cont.
X[1]
X[1]
X[1]
X[1]
X[2]
X[2]
X[2]
X[2]
X[3]
X[3]
X[3]
X[3]
Example6:
• Consider a digital sequence sampled at the rate of 10 kHz. If we use a size of
1,024 data points and apply the 1,024-point DFT to compute the spectrum,
– a. Determine the frequency resolution.
– b. Determine the highest frequency in the spectrum.
DFT coefficients computation using fast Fourier
transform (FFT) algorithm
• The FFT algorithm requires the time domain sequence x[n] to have a
length of data points equal to a power of 2; that is, 2m samples,
where m is a positive integer.
• If the length of the available data is not equal to a power of 2
(required by the FFT), we can pad the data sequence with zeros to
create a new sequence with a larger number of samples, N = 2m > N.
The modified data sequence for applying FFT, therefore, is
x[n] x[n]
• The signal spectra obtained via zero-padding the data sequence does
not add any new information and does not contain more accurate
signal spectral presentation. In this situation, the frequency spacing
is reduced due to more DFT points, and the achieved spectrum is an
interpolated version with ‘‘better display.’’
Zero padding effect by using FFT
Example7:
Spectral Estimation Using Window Functions
or