0% found this document useful (0 votes)
79 views

DSP-Lec 07-Frequency Analysis of Signals and Systems

The document discusses frequency analysis of signals and systems. It defines the discrete-time Fourier transform (DTFT) as the Fourier transform of a discrete-time signal. The DTFT is continuous but periodic with period 2π. The discrete Fourier transform (DFT) samples the DTFT at discrete frequencies to obtain a finite discrete frequency representation of a signal. The DFT has a matrix form using roots of unity. The fast Fourier transform (FFT) efficiently computes the DFT using divide-and-conquer algorithms. Frequency analysis is used for spectral estimation, convolution, and efficient coding of signals.

Uploaded by

thienminh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views

DSP-Lec 07-Frequency Analysis of Signals and Systems

The document discusses frequency analysis of signals and systems. It defines the discrete-time Fourier transform (DTFT) as the Fourier transform of a discrete-time signal. The DTFT is continuous but periodic with period 2π. The discrete Fourier transform (DFT) samples the DTFT at discrete frequencies to obtain a finite discrete frequency representation of a signal. The DFT has a matrix form using roots of unity. The fast Fourier transform (FFT) efficiently computes the DFT using divide-and-conquer algorithms. Frequency analysis is used for spectral estimation, convolution, and efficient coding of signals.

Uploaded by

thienminh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Chapter 7

Frequency Analysis of Signals and Systems


Dang Nguyen Chau. Click to edit Master subtitle style
Ho Chi Minh City University of Technology
Email: [email protected]
 Frequency analysis of signal involves the resolution of the signal into
its frequency (sinusoidal) components. The process of obtaining the
spectrum of a given signal using the basic mathematical tools is
known as frequency or spectral analysis.
 The term spectrum is used when referring the frequency content of a
signal.
 The process of determining the spectrum of a signal in practice base
on actual measurements of signal is called spectrum estimation.
 The instruments of software programs
used to obtain spectral estimate of such
signals are known as spectrum analyzers.

2
 The frequency analysis of signals and systems have three major uses
in DSP:
 The numerical computation of frequency spectrum of a signal.
 The efficient implementation of convolution by the fast Fourier
transform (FFT).
 The coding of waves, such as speech or pictures, for efficient
transmission and storage.

3
Content

1. Discrete time Fourier transform DTFT

2. Discrete Fourier transform DFT

3. Fast Fourier transform FFT

4
1. Discrete-time Fourier transform (DTFT)
 The Fourier transform of the finite-energy discrete-time signal x(n) is
defined as: 
 j n
X ( )   x ( n )e
n 

where ω=2πf/fs
 The spectrum X(w) is in general a complex-valued function of
frequency: j ( )
X ( ) | X ( ) | e

where  ( )  arg( X ( )) with -   ( )  


| X ( ) |: is the magnitude spectrum
 ( ) : is the phase spectrum

5
 Determine and sketch the spectra of the following signal:
a) x(n)   (n)
b) x(n)  a nu (n) with |a|<1

6
 Determine and sketch the spectra of the following signal:
a) x(n)   (n)
b) x(n)  a nu (n) with |a|<1

 X ( ) is periodic with period 2π.


 
 j (  2 k ) n
X (  2 k )   x ( n )e   x(n)e  j n  X ( )
n  n 

The frequency range for discrete-time signal is unique over the


frequency interval (-π, π), or equivalently, (0, 2π).

7
 Determine and sketch the spectra of the following signal:
a) x(n)   (n)
b) x(n)  a nu (n) with |a|<1

 X ( ) is periodic with period 2π.


 
 j (  2 k ) n
X (  2 k )   x ( n )e   x(n)e  j n  X ( )
n  n 

The frequency range for discrete-time signal is unique over the


frequency interval (-π, π), or equivalently, (0, 2π).

Remarks: Spectrum of discrete-time signals is continuous and periodic.

8
Inverse discrete-time Fourier transform
(IDTFT)
 Given the frequency spectrum X ( ) , we can find the x(n) in time-
domain as

1
x( n)   X ( )e j n d
2 

which is known as inverse-discrete-time Fourier transform (IDTFT)

Example: Consider the ideal lowpass filter with cutoff frequency wc.
Find the impulse response h(n) of the filter.

9
Properties of DTFT
 Symmetry: if the signal x(n) is real, it easily follows that
X  ( )  X (  )

or equivalently, | X ( ) || X ( ) | (even symmetry)


arg( X (  ))   arg( X ( )) (odd symmetry)
We conclude that the frequency range of real discrete-time signals can
be limited further to the range 0 ≤ ω≤ π, or 0 ≤ f ≤ fs/2.
 Energy density of spectrum: the energy relation between x(n) and
X(ω) is given by Parseval’s relation:
 
2 1 2
Ex   | x( n) |   X ( ) d 
n  2 

S xx ( ) | X ( ) |2 is called the energy density spectrum of x(n)


10
Properties of DTFT

 The relationship of DTFT and z-transform: if X(z) converges for



|z|=1, then x( n)e  j n  X ( )
X (z) |  z  e j 
n 

F
 Linearity: if x1 (n)   X 1 ( )
F
x2 (n)   X 2 ( )
F
a x
then 1 1 ( n )  a x
2 2 ( n )   a1 X 1 ( )  a2 X 2 ( )
F
 Time-shifting: if x(n)   X ( )

then
F
x(n  k )   e  jk X ( )

11
Properties of DTFT
F
 Time reversal: if x(n)   X ( )
F
then x(n)  X ( )

F
 Convolution theory: if x1 (n)   X 1 ( )
F
x2 (n)   X 2 ( )
F
then x(n)  x1 (n)  x2 (n)   X ( )  X 1 ( ) X 2 ( )

Example: Using DTFT to calculate the convolution of the sequences


x(n)=[1 2 3] and h(n)=[1 0 1].

12
Frequency resolution and windowing
 The duration of the data record is:

 The rectangular window of length


L is defined as:

 The windowing processing has two major effects: reduction in the


frequency resolution and frequency leakage.

13
Rectangular window

14
Impact of rectangular window
 Consider a single analog complex sinusoid of frequency f1 and its
sample version:

 With assumption , we have

15
Double sinusoids

 Frequency resolution:

16
Hamming window

17
Non-rectangular window
 The standard technique for suppressing the sidelobes is to use a non-
rectangular window, for example Hamming window.
 The main tradeoff for using non-rectangular window is that its
mainlobe becomes wider and shorter, thus, reducing the frequency
resolution of the windowed spectrum.
 The minimum resolvable frequency difference will be

where : c=1 for rectangular window and c=2 for Hamming


window.

18
Example
 The following analog signal consisting of three equal-strength
sinusoids at frequencies

where t (ms), is sampled at a rate of 10 kHz. We consider four data


records of L=10, 20, 40, and 100 samples. They corresponding of the
time duarations of 1, 2, 4, and 10 msec.

 The minimum frequency separation is

Applying the formulation , the minimum


length L to resolve all three sinusoids show be 20 samples for the
rectangular window, and L =40 samples for the Hamming case.

19
Example

20
Example

21
2. Discrete Fourier transform (DFT)
 X ( ) is a continuous function of frequency and therefore, it is not a
computationally convenient representation of the sequence x(n).
 DFT will present x(n) in a frequency-domain by samples of its
spectrum X ( ) .
 A finite-duration sequence x(n) of length L has a Fourier transform:
L 1
X ( )   x(n)e  j n 0    2
n0
2 k
Sampling X(ω) at equally spaced frequency k  , k=0, 1,…,N-1
N
where N ≥ L, we obtain N-point DFT of length L-signal:
L 1
2 k
X (k )  X ( )   x(n)e  j 2 kn / N (N-point DFT)
N n 0

 DFT presents the discrete-frequency samples of spectra of discrete-


time signals.
22
2. Discrete Fourier transform (DFT)
 With the assumption x(n)=0 for n ≥ L, we can write
N 1
X (k )   x(n)e  j 2 kn / N , k  0,1, , N  1. (DFT)
n 0

 The sequence x(n) can recover form the frequency samples by


inverse DFT (IDFT)
N 1
1
x( n)   X ( k ) e j 2 kn / N
, n  0,1, , N  1. (IDFT)
N n 0

Example: Calculate 4-DFT and plot the spectrum of x(n)=[1 1, 2, 1]

23
Matrix form of DFT
 By defining an Nth root of unity WN  e j 2 / N , we can rewrite DFT
and IDFT as follows
N 1
X (k )   x(n)WNkn , k  0,1, , N  1. (DFT)
n 0
N 1
1 (IDFT)
N , n  0,1, , N  1.
 kn
x( n) 
N
 X
n 0
( k )W

 Let us define:  x(0)   X (0) 


 x(1)   X (1) 
xN    XN   
     
   
 x ( N  1)   X ( N  1) 

The N-point DFT can be expressed in matrix form as: X N  WN x N

24
Matrix form of DFT
1 1 1  1 
1 W W 2
 WNN 1 
 N N

WN  1 WN2 WN4  WN2( N 1) 


 
     
1 WNN 1 WN2( N 1)  WN( N 1)( N 1) 

 Let us define:  x(0)   X (0) 


 x(1)   X (1) 
xN    XN   
     
   
 x ( N  1)   X ( N  1) 

The N-point DFT can be expressed in matrix form as: X N  WN x N

25
 Example: Determine the DFT of the four-point sequence x(n)=[1 1,
2 1] by using matrix form.

26
Properties of DFT
Properties Time domain Frequency domain
 Notation x ( n) X (k )

 Periodicity x ( n  N )  x ( n) X (k )  X (k  N )

 Linearity a1 x1 (n)  a2 x2 (n) a1 X 1 (k )  a2 X 2 (k )

 Circular time-shift x((n  l )) N e j 2 kl / N X (k )

 Circular convolution
 Multiplication
of two sequences
N N 1
1
 Parveval’s theorem 2
E x   | x ( n) |   | X ( k ) |2

n 0 N k 0

27
Circular shift
 The circular shift of the sequence can be represented as the index
modulo N:
x '(n)  x (n  k , modulo N )  x((n  k )) N

28
Circular convolution
 The circular convolution of two sequences of length N is defined as

 Example: Perform the circular convolution of the following two


sequence:
x1 (n)  [2,1, 2,1] x2 (n)  [1, 2,3, 4]

It can been shown from the below Fig,

29
Circular convolution

30
Circular convolution

31
Use of the DFT in Linear Filtering
 Suppose that we have a finite duration sequence x=[x0, x1,…, xL-1 ]
which excites the FIR filter of order M.
 The sequence output is of length Ly=L+M samples.
 If N ≥ L+M, N-point DFT is sufficient to present y(n) in the
frequency domain, i.e.,

 Computation of the N-point IDFT must yield y(n).


 Thus, with zero padding, the DFT can be used to perform linear
filtering.
32
3. Fast Fourier transform (FFT)
 N-point DFT of the sequence of data x(n) of length N is given by
following formula:
N 1
X (k )   x  n  WNk , k  0,1, 2,..., N  1
n 0
 j 2 / N
where WN  e
 In general, the data sequence x(n) is also assumed to be complex
valued. To calculate all N values of DFT require N2 complex
multiplications and N(N-1) complex additions.
 FFT exploits the symmetry and periodicity properties of the phase
factor WN to reduce the computational complexity.
- Symmetry: WNk  N / 2  WNk
- Periodicity: WNk  N  WNk
33
3. Fast Fourier transform (FFT)
 Based on decimation, leads to a factorization of computations.
 Let us first look at the classical radix 2 decimation in time.
 First we split the computation between odd and even samples:
N /2 1 N /2 1
X k    x  2n  Wk2n
N   x  2n  1 WNk  2n 1
n0 n 0
2
 Using the following property: W  WN
N
2
 The N-point DFT can be rewritten:
N /2 1 N /2 1
X k    x  2n  WNkn  WNk  x  2n  1 WNkn
n0 2 n0 2
for k=0, 1, …, N-1
34
Fast Fourier transform (FFT)
 Using the property that: N
k
WN 2
  WNk

 The entire DFT can be computed with only k=0, 1, …,N/2-1.


N /2 1 N /2 1
X k    x  2n  WNkn  WN-k  x  2n  1 WNkn
n0 2 n 0 2

 N  N /21 N /2 1
X  k     x  2n  WN  WN  x  2n  1 WNkn
kn k

 2  n 0 2 n0 2

35
Butterfly
 This leads to basic building block of the FFT, the butterfly.

x(0) X(0) We need:


x(2) X(1) •N/2(N/2-1) complex ‘+’ for
each N/2 DFT.
DFT N/2 •(N/2)2 complex ‘×’ for each
DFT.
x(N--2)
x(N X(N/2--1)
X(N/2
•N/2 complex ‘×’ at the input
of the butterflies.
x(1) WN0
•N complex ‘+’ for the butter-
- X(N/2) flies.
x(3) WN1
- X(N/2+1) •Grand total:

DFT N/2 N2/2 complex ‘+’


N/2(N/2+1) complex ‘×’
WNN/2
N/2--1
x(N--1)
x(N X(N--1)
X(N
-

36
Recursion
 If N/2 is even, we can further split the computation of each DFT of
size N/2 into two computations of half size DFT. When N=2r this can
be done until DFT of size 2 (i.e. butterfly with two elements).
3rd stage 2nd stage 1st stage
x(0) X(0)
W80
x(4) - X(1)
W80
x(2) - X(2)
W80 W82
x(6) - - X(3)

W80
x(1) - X(4)
W80=1 W80 W81
x(5) - - X(5)
W80 W82
x(3) - - X(6)
W80 W82 W83
x(7) - - - X(7)
37
Shuffling the data, bit reverse ordering
 At each step of the algorithm, data are split between even and odd
values. This results in scrambling the order.

38
Number of operations
 If N=2r, we have r=log2(N) stages. For each one we have:
• N/2 complex ‘×’ (some of them are by ‘1’).
• N complex ‘+’.
 Thus the grand total of operations is:

• N/2 log2(N) complex ‘×’.


• N log2(N) complex ‘+’

 Example: Calculate 4-point DFT of x=[1, 3, 2, 3] ?

39
Homework

 Problems: 9.1, 9.2, 9.14, 9.24, 9.25

40

You might also like