Chapter
p 7
Frequency Analysis of Signals and Systems
Ha Hoang Kha, Ph.D.Click to edit Master subtitle style
Ho Chi Minh City University of Technology
@
Email:
CuuDuongThanCong.com
/>
Frequency analysis of signal involves the resolution of the signal into
its freq
frequency
enc (sinusoidal)
(sin soidal) components.
components The process of obtaining the
spectrum of a given signal using the basic mathematical tools is
known
w as frequency
q
y or spectral
p
analysis.
y
The term spectrum is used when referring the frequency content of a
signal.
g
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 kwon as spectrum analyzers.
Ha H. Kha
2
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
The frequency analysis of signals and systems have three major uses
in DSP
DSP:
1) The numerical computation of frequency spectrum of a signal.
2) The efficient implementation of convolution by the fast Fourier
transform ((FFT))
3) The coding of waves, such as speech or pictures, for efficient
transmission and storage.
g
Ha H. Kha
3
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Content
1. Discrete time Fourier transform DTFT
2. Discrete Fourier transform DFT
3. Fast Fourier transform FFT
Ha H. Kha
4
CuuDuongThanCong.com
Transfer functions
and Digital Filter Realizations
/>
1. Discrete-time Fourier transform (DTFT)
The Fourier transform of the finite-energy discrete-time signal x(n) is
defined as:
∞
X (ω ) = ∑ x(n)e − jω n
n =−∞
where
h ω=2πf/fs
2 f/f
The spectrum X(w) is in general a complex-valued function of
f
frequency:
X (ω ) =| X (ω ) | e jθ (ω )
where
h
θ (ω ) = arg(( X (ω )) with
i h -π ≤ θ (ω ) ≤ π
| X (ω ) |
θ (ω )
: is the magnitude spectrum
: is the phase spectrum
Ha H. Kha
5
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Determine and sketch the spectra of the following signal:
a)) x(n) = δ (n)
b) x(n) = a nu (n) with |a|<1
X (ω ) is p
periodic with p
period 2π.
X (ω + 2π k ) =
∞
∑
x ( n)e
− j ( ω + 2π k ) n
n =−∞
=
∞
∑
x(n)e − jω n = X (ω )
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
periodic.
Ha H. Kha
6
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Inverse discrete-time Fourier transform (IDTFT)
Given the frequency spectrum X (ω ) , we can find the x(n) in timedomain as
1
x ( n) =
2π
π
∫π
X (ω )e jω n dω
−
which is known as inverse-discrete-time Fourier transform (IDTFT)
Example:
p Consider the ideal lowpass
p filter with cutoff frequency
q
y wc.
Find the impulse response h(n) of the filter.
Ha H. Kha
7
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Properties of DTFT
Symmetry: if the signal x(n) is real, it easily follows that
X ∗ (ω ) = X (−ω )
or equivalently, | X (−ω ) |=| X (ω ) |
(even symmetry)
(odd symmetry)
arg( X (−ω )) = − arg( X (ω ))
We conclude that the frequency range of real discrete-time
discrete time signals can
be limited further to the range 0 ≤ ω≤π, or 0 ≤ f≤fs/2.
Energy
E
ddensity
i off spectrum: the
h energy relation
l i b
between x(n)
( ) andd
X(ω) is given by Parseval’s relation:
∞
1
Ex = ∑ | x(n) |2 =
2π
n =−∞
π
∫π
X (ω ) dω
2
−
S xx (ω ) =| X (ω ) |2 is called the energy density spectrum of x(n)
Ha H. Kha
8
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Properties of DTFT
The relationship of DTFT and z-transform:
z transform: if X(z) converges for
∞
|z|=1, then
X ( z ) |z =e ω = ∑ x(n)e − jω n = X (ω )
j
n =−∞
Linearity: if
then
F
x1 (n) ←⎯
→ X 1 (ω )
F
x2 (n) ←⎯
→ X 2 (ω )
F
a1 x1 (n) + a2 x2 (n) ←⎯
→ a1 X 1 (ω ) + a2 X 2 (ω )
Time-shifting: if
then
F
x(n) ←⎯
→ X (ω )
F
x(n − k ) ←⎯
→ e − jω k X (ω )
Ha H. Kha
9
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Properties of DTFT
F
→ X (ω )
Time reversal: if x(n) ←⎯
th
then
x(−n) ←⎯
← F → X (−ω )
← F → X 1 (ω )
Convolution theory: if x1 (n) ←⎯
F
x2 (n) ←⎯
→ X 2 (ω )
then
F
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].
Ha H. Kha
10
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Frequency resolution and windowing
The duration of the data record is:
The rectangular
g
window of length
g
L is defined as:
The
Th windowing
i d i processing
i has
h ttwo major
j effects:
ff t reduction
d ti in
i the
th
frequency resolution and frequency leakage.
Ha H. Kha
11
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Rectangular window
Ha H. Kha
12
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Impact of rectangular window
Consider a single analog complex sinusoid of frequency f1 and its
sample version:
With assumption
Ha H. Kha
, we have
13
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Double sinusoids
Frequency resolution:
Ha H. Kha
14
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Hamming window
Ha H. Kha
15
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Non-rectangular window
The standard technique for suppressing the sidelobes is to use a nonrectangular window
window, for example Hamming window
window.
The main tradeoff for using non-rectangular window is that its
mainlobe becomes wider and shorter
shorter, thus
thus, reducing the frequency
resolution of the windowed spectrum.
The minimum resolvable frequency difference will be
where
window.
: c=1 for rectangular
g
window and c=2 for Hammingg
Ha H. Kha
16
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
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,
L 10, 20, 40, and 100 samples. They corresponding of the
time duarations of 1, 2, 4, and 10 msec.
The
Th minimum
i i
frequency
f
separation
i is
i
Applying
A l i
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.
Ha H. Kha
17
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Example
Ha H. Kha
18
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Example
Ha H. Kha
19
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
2. Discrete Fourier transform (DFT)
X (ω ) is a continuous function of frequency and therefore, it is not a
computationally
p
y convenient representation
p
of the sequence
q
x(n).
( )
DFT will present x(n) in a frequency-domain by samples of its
spectrum
p
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
Sampling
p g X(ω)
( ) at equally
q y spaced
p
frequency
q
y ωk = 2π k , k=0, 1,…,N-1
where N ≥ L, we obtain N-point DFT of length N
L-signal:
L −1
2π k
X (k ) ≡ X (
) = ∑ x(n)e− j 2π kn / N
(N i t DFT)
(N-point
N
n =0
DFT presents the discrete-frequency samples of spectra of discretetime
i signals.
i l
Ha H. Kha
20
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
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
Th sequence
q n x(n)
(n) can
n recover
r
r fform
rm th
the fr
frequency
q n samples
mpl b
by in
inverse
r
DFT (IDFT)
1
x ( n) =
N
N −1
j 2π kn
k /N
X
(
k
)
e
, n = 0,1,… , N − 1.
∑
(IDFT)
n=0
Example: Calculate 4-DFT and plot the spectrum of x(n)=[1 1, 2, 1]
Ha H. Kha
21
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Matrix form of DFT
By defining an Nth root of unity WN = e− j 2π / N , we can rewritte DFT
and IDFT as follows
N −1
X (k ) = ∑ x(n)WNkn , k = 0,1,… , N − 1.
(DFT)
n =0
1
x ( n) =
N
N −1
− kn
X
k
W
(
)
∑
N , n = 0,1,… , N − 1.
(IDFT)
n =0
Let us define: ⎡ x(0) ⎤
⎡ X (0) ⎤
⎢ x(1) ⎥
⎢ X (1) ⎥
⎥ X =⎢
⎥
xN = ⎢
N
⎢
⎥
⎢
⎥
⎢
⎥
⎢
⎥
x
(
N
−
1)
)
X
(
N
1)
−
⎣
⎦
⎣
⎦
The N-point DFT can be expressed in matrix form as: X N = WN x N
Ha H. Kha
22
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Matrix form of DFT
1
1
⎡1
⎢1 W
2
W
N
N
⎢
WN = ⎢1 WN2
WN4
⎢
⎢
⎢⎣1 WNN −1 WN2( N −1)
⎤
WNN −1 ⎥⎥
WN2( N −1) ⎥
⎥
⎥
( N −1)( N −1) ⎥
WN
⎦
1
Let us define: ⎡ x(0) ⎤
⎡ X (0) ⎤
⎢ x(1) ⎥
⎢ X (1) ⎥
⎥ X =⎢
⎥
xN = ⎢
N
⎢
⎥
⎢
⎥
⎢
⎥
⎢
⎥
x
(
N
−
1)
)
−
X
(
N
1)
⎣
⎦
⎣
⎦
The N-point DFT can be expressed in matrix form as: X N = WN x N
Ha H. Kha
23
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Example: Determine the DFT of the four-point sequence x(n)=[1 1,
2 1] by using matrix form
form.
Ha H. Kha
24
CuuDuongThanCong.com
Frequency analysis of signals and systems
/>
Properties of DFT
Properties
Time domain
Frequency domain
Notation
x ( n)
X (k )
Periodicity
Linearity
x ( n + N ) = x ( n)
X (k ) = X (k + N )
a1 x1 (n) + a2 x2 (n)
a1 X 1 (k ) + a2 X 2 (k )
Circular
Ci l time-shift
i
hif
e − j 2π kl / N X (k )
x((n − l )) N
Circular convolution
Multiplication
of two sequences
Parveval’s theorem
Ha H. Kha
N
1
E x = ∑ | x ( n) | =
N
n=0
2
25
CuuDuongThanCong.com
N −1
2
|
(
)
|
X
k
∑
k =0
Frequency analysis of signals and systems
/>