Digital Signal Processing Tutorial:Chapt 3 frequency analysis
This document provides an overview of frequency analysis techniques for signals and systems, including the Fourier series, Fourier transform, discrete-time Fourier series (DTFS), discrete-time Fourier transform (DTFT), and discrete Fourier transform (DFT). It discusses properties and applications of these techniques, such as analyzing periodic and aperiodic signals. Examples are provided to illustrate calculating the Fourier series and transform of simple signals. The document also covers sampling theory and the Nyquist criterion for proper reconstruction of signals from samples.
Introduction to Digital Signal Processing, covering frequency analysis chapters and copyright details.
Explains frequency analysis of signals and systems, Fourier Series, Continuous and Discrete Fourier Transforms. Details Dirichlet conditions for Fourier transforms, sampling theorem, Nyquist criterion, and cases of sampling frequency.
Introduces DFT, its relation to DTFT, sequence lengths, and the approach for computing DFT.
Presents problems related to DFT calculations, solutions using Fourier series, DFT properties.
Explains FFT flow diagrams, bit-reversal algorithms, and properties of FFT for efficient computation.
Discusses the convolution properties using DFT, including circular convolution and Parseval’s relation.
Illustrates linear convolution and filtering techniques, including overlap-add and overlap-save methods for FIR filters.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 3
Chapt 3 : Frequency Analysis of Signals &
Systems
Contents:
• Frequency Analysis: CTS and DTS
• Properties of the Fourier Transform for DTS
• Frequency domain characteristics of LTI systems
• LTI system as a frequency selective filter
• Inverse systems and de-convolution
4.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 4
Frequency Analysis: CTS and DTS
• Analysis tools
• Fourier Series
• Fourier Transform
• DTFS
• DTFT
• DFT
Jean Baptiste Joseph
Fourier (1768 - 1830).
Fourier was a French
mathematician, who was
taught by Lagrange and
Laplace
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 6
Fourier Series
•Continuous time variable t
•Discrete frequency variable k
•Signal to be analyzed has to
be periodic
• Fourier series for continuous-time periodic signal
•
tTp
∑
∞
−∞=
=
k
tkFj
k eCtx 02
)( π
dtetx
T
C tkFj
Tp
k
p
02
)(
1 π−
∫=
Tp-> is the Fundamental Period of Signal
where
7.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 7
•Continuous time variable t
•Continuous frequency variable F
•Signal to be analyzed is aperiodic
Fourier Transform
• Fourier Transform for continuous-time periodic
signal
t
∫
∞
∞−
= dFeFXtx Ftj π2
)()(
Tp-> is the Fundamental Period of Signal
where
∫
∞
∞−
−
= dtetxFX Ftj π2
)()(
8.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 8
• Fourier Series Periodic signal
• Fourier Transform Aperiodic signal
When Fourier series is applied to the aperiodic signal by assuming
its period = , then it is called as Fourier transform
Fourier Series & Fourier Transform
Fourier
Series
t
Tp F
Fourier
Series
Tp=∞
∆F=1/Tp
F
∆F=1/Tp=0
∞
)(lim)( txtx T
T ∞→
=
9.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 9
•Discrete time variable t
•Discrete frequency variable k
•Signal to be analyzed has to
be periodic
DTFS
• Fourier series for discrete-time periodic signal
∑
−
=
=
1
0
2
)(
N
k
k
N
knj
eCnx
π
∑
−
=
−
=
1
0
2
)(
1 N
n
k
N
knj
enx
N
C
π
Tp-> is the Fundamental Period of Signal
where
10.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 10
•Discrete time variable t
•Continuous frequency variable F
•Signal to be analyzed is aperiodic
DTFT
• Fourier Transform for discrete-time periodic
signal
∫=
π
ω
ωω
π 2
)(
2
1
)( deXnx nj
Tp is the Fundamental Period of Signal
where
∑
∞
−∞=
−
=
n
jwn
enxX )()(ω
11.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 11
Dirichlet Conditions
• To exist Fourier transform of the signal, it should satisfy
Dirichlet Conditions
1. The signal has finite number of discontinuities
2. It has finite number of maxima and minima
3. The signal should be absolutely integral
i.e.
∞<∫
∞
∞−
dttx )(
∑
∞
−∞=
∞<
n
dtnx )(
or
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 13
Solution (1)
dtetx
T
C tjk
T
k
0
0
)(
1
0
ω−
∫=
As per Fourier series
π20 =T ttx 0
2
5
)( ω
π
= for π20 ≤≤ wt
tdwet
T
C tjkw
k 0
2
0
02
5
0
0
1 −
∫=
π
π ω tdwteC tjkw
k 0
2
0
0
0
2
5
2
1
∫
−
=
π
ω
ππ
( )
π
π
2
0
022
1
)()2(
5 0
−−
−
=
−
tjkw
jk
e tjkw
k
jCk
π2
5
=
LLL ++++−−= −− twjtwjtjwtwj
ejejejejtx 0000 2
4
52
2
5
2
5
2
52
4
5
)( ππππ
0
14.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 14
Problem (2)
Obtain Fourier transform for the gate function ( rectangular pulse)
as shown in fig
0-T/2 T/2 t
,1)( =tf 22
TT
t ≤≤−
=0 otherwise
15.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 15
Solution (2)
We know
∫
∞
∞−
−
= dtetfwF jwt
)()(
∫−
−
=
2/
2/
.1
T
T
jwt
dte
2/
2/
T
T
jwt
jw
e
−
−
−
= [ ]2/2/1 jwTjwT
ee
jw
−
−
= −
jw
ee jwTjwT 2/2/
−
=
−
w
wT )2/sin(2
=
)2/(sin
2/
)2/sin(
wTcT
wt
wT
T ==
Amplitude
Phase
16.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 16
Problem (3)
A finite duration sequence of Length L is given as
Determine the N-point DFT of this sequence for N≥L
,1)( =nx 10 −≤≤ Ln
=0 otherwise
17.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 17
Solution (3)
The Fourier transform (DTFT) is given by
∑
∞
−∞=
−
=
n
jwn
enxX )()(ω
∑
−
=
−
=
1
0
.1
L
n
jwn
e ∑
−
=
−
=
1
0
)(
L
n
njw
e
We know summation formula
∑=
+
−
−
=
n
k
n
k
a
a
a
0
1
1
1
jw
jwL
e
e
X −
−
−
−
=
1
1
)(ω 2/2/2/2/
2/2/2/2/
jwjwjwjw
jwLjwLjwLjwL
eeee
eeee
−−
−−
−
−
=
)(
)(
2/2/2/
2/2/2/
jwjwjw
jwLjwLjwL
eee
eee
−−
−−
−
−
=
)2/sin(
)2/sin(2/)1(
w
wL
e Ljw −−
=
18.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 18
Contd..
DFT of x(n) can be obtained by sampling X(w) at N
equally spaced frequencies
N
k
wk
π2
=∴ 1,.......1,0 −= Nk
Nkj
NkLj
e
e
kX /2
/2
1
1
)( π
π
−
−
−
−
= 1,.......1,0 −= Nk
,)( LkX = 0=KIf N=L,
0= 1.......2,1 −= LK
•If N>L, computational point of view sequence x(n) is extended by
appending N-L zeroes(zero padding).
• DFT would approach to DTFT as no of points in DFT tends to infinity
19.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 19
Nyquist Criterion – Sampling Theorem
• Continuous time domain( analog ) signal is converted into discrete time
signal by sampling process. It should be sampled in such a way that the original
signal can be reconstructed from the samples
• Nyquist criterion or sampling theorem suggest the minimum sampling
frequency by which signal should be sampled in order to have proper reconstruction
if required.
Mathematically, sampled signal xs(t) is obtained by multiplying sampling
function gT(t) with original signal x(t)
)1.......().........()()( tgtxtx Ts =
Where gT(t) continuous train of pulse with period T (sampling period)
)(
1
)(
Triodsamplingpe
fequencysamplingfr s =
20.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 20
Contd..
The Fourier series of periodic signal gT(t) can be given as
dtetg
T
C tnfj
T
T
n
sπ2
2/
2/
)(
1 −
−
∫=
)2........(..........)( 2
∑
∞
−∞=
=
n
tnfj
n
s
eCtg π
Where
gT(t)
x(t)
t
t
Thus, from eq(1) and eq(2), we get
∑
∞
−∞=
=
n
tnfj
ns
s
eCtxtx π2
)()(
)3.........(..........)( 2
∑
∞
−∞=
=
n
tnfj
n
s
etxC π
21.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 21
Contd..
Taking Fourier transform of xs(t), we get
∫
∞
∞−
−
= dtetxfX ftj
ss
π2
)()(
∫ ∑
∞
∞−
−
∞
−∞=
= dteetxC ftj
n
tnfj
n
s ππ 22
)(
Interchanging the order of integration and summation , we get
∑ ∫
∞
−∞=
−−
∞
∞−
=
n
tnffj
n dtetxC s )(2
)( π
∑
∞
−∞=
−=
n
sns nffXCfX )()(
By definition
22.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 22
Contd..
Thus, spectrum of sampled signal is the spectrum of x(t) plus the spectrum of
x(t) translated to each harmonic fo the sampling frequency as shown in figure
X(f)
f
-fh fh
-fh fh fs-fh fs+fhfs 2fs-fh 2fs+fh2fs
-2fs-fh -2fs+fh-2fs -fs-fh -fs
-fs+fh
There are three cases when sampling frequency fs is compared with
highest frequency present in original signal
Xs(f)
23.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 23
Contd..
Case I: fs > 2fh
In this case all spectrums would be isolated from each other . This
leads to proper reconstruction of original signal
Case II: fs = 2fh
-fh fh fs-fh fs+fhfs 2fs-fh 2fs+fh2fs
-2fs-fh -2fs+fh-2fs -fs-fh -fs
-fs+fh
Xs(f)
Case III: fs < 2fh
-fh fh fs 2fs
-2fs -fs
Xs(f)
Overlapping of spectrum causes aliasing effect which distorts in
reconstruction of original signal
24.
N-points in time
domainwill give
N-points in DFT
and vice-versa
10/7/2009
e-TECHNote from IRDC India
[email protected] 24
DFT
DTFT has continuous frequency domain variable which makes
impossible to store X(w) with digital device. Thus continuous
frequency variable (f or w) from DTFT is sampled to get
discrete frequencies (wk).
DTFT calculated for discrete frequencies (wk) is called as
Discrete Fourier Transform
N
k
wk
π2
=
∑
−
=
−
=
1
0
/2
)()(
N
n
Nknj
enxkX π
1,.......1,0 −= Nk
∑
−
=
=
1
0
/2
)(
1
)(
N
k
Nknj
ekX
N
nx π
1,.......1,0 −= Nn
DFT
Inverse DFT ( IDFT)
25.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 25
Physical Significance
• Signal to be analyzed is 64 points in length
x(n)
analog discrete
0 10 20 30 40 50 60 70
-0.5
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
0 10 20 30 40 50 60 70
-0 .5
-0 .4
-0 .3
-0 .2
-0 .1
0
0 .1
0 .2
0 .3
0 .4
0 .5
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 30
k=31
)/2sin()/2cos(
2
NnkjNnke N
nk
j
ππ
π
+=
−
0 10 20 30 40 50 60 70
-1
-0.5
0
0.5
1
SINE SEQUENCE
Amplitude
n
0 10 20 30 40 50 60 70
-1
-0.5
0
0.5
1
COSINE SEQUENCE
Amplitude
n
0 10 20 30 40 50 60 70
-1
-0.5
0
0.5
1
SINE SEQUENCE
Amplitude
n
0 10 20 30 40 50 60 70
-1
-0.5
0
0.5
1
COSINE SEQUENCE
Amplitude
n
31.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 31
Relation bet VA and DFT
Vector algebra -2/3D space DFT
No of analysis vectors 2/3 N
No of elements in each
vector
2/3 N
Projection measurement
method
Inner Product Inner Product
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 38
Solution(2)
}2221{)( =nx
We know
∑
−
=
−
=
1
0
/2
)()(
N
n
Nknj
enxkX π
1,.......1,0 −= Nk
For k=0
∑∑ ==
==
3
0
3
0
0
)()()0(
nn
nxenxX
61221 =+++=
For k=1
∑=
−
=
3
0
4/
)()1(
n
nj
enxX π
4/3
2/4/0
)3(
)2()1()0(
π
ππ
j
jj
ex
exexex
−
−−
+
++=
N=4
39.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 39
Contd..
2/3
2/0
)3(
)2()1()0(
π
ππ
j
jj
ex
exexex
−
−−
+
++=
jj .1)1.(2).(21 +−+−+=
jX −−= 1)1(
Similarly, calculate X(2) & X(3)
Then use IDFT to calculate x(n)
40.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 40
Twiddle Factors
Twiddle Factor N
j
N eW
π2
=
( ) 1
00 2
==∴ N
j
N eW
π
( ) NN
jj
N eeW
ππ 22 11
==∴
( ) NN
jj
N eeW
ππ 42 22
==∴
So on…….
For N=4
For N=8
W4
0
W4
3
W4
2
W4
1
W8
0
W8
7
W8
6
W8
5
W8
4
W8
3
W8
2
W8
1
( ) N
l
N
jljl
N eeW
ππ 22
==
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 54
Shuffled sequence
The input sequence placement at FFT flow graph is not in order but in
shuffled order.
Perfect shuffling can be obtained by using bit reversal algorithm.
( to be used in FFT implementation)
2 point FFT
0
1
4 point FFT
0
1
2
3
0 2
1 3
0 2 1 3
8 point FFT
0
1
2
3
4
5
6
7
0 4
1 5
2 6
3 7
0 4 2 6
1 5 3 7
0 1 0 4 2 6 1 5 3 7
16-point shuffled sequence ?????
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 60
Properties of DFT
1) Periodicity
and x[n] is periodic such that x[n+N]=x[n] for all n
If x[n] X(k) ,
Then, X[k+N] = X(k) for all k
i.e. DFT of periodic sequence is also periodic with same period
61.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 61
2) Linearity
][][
][][
22
11
kXnx
kXnx
DFT
DFT
→←
→←If
and
then for any real-valued or complex valued constants a1 and a2 ,
][][][][ 22112211 kXakXanxanxa DFT
+ →←+
62.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 62
Problem
a) Find the DFT of x1(n)={ 0 1 2 3} and x2(n)= { 1 2 2 1}.
b) Calculate the DFT of x3(n)={ 2 5 6 5} using results obtained
in a) otherwise not.
}1,0,1,6{)(2 jjkX +−−−=
}22,2,22,6{)(1 jjkX −−−+−=
Since x1(n) + 2x2(n)= x3(n) , X3(k)= X1(k) + 2X2(k)
}1,0,1,6{2}22,2,22,6{)(3 jjjjkX +−−−+−−−+−=
}4,2,4,18{)(3 −−−=kX
63.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 63
3) Circular time shift, x((n-k))N
x(n)={1 2 3 4 }
xp(n)
xp(n)
Circular delay by
1,x((n-1))
Circular advance
by 1 ,x((n+1))
x(0)=1x(2)=3
x(1)=2
x(3)=4
x(1)=2x(3)=4
x(2)=3
x(0)=1
x(n)
x((n+1))4
x(3)=4x(1)=2
x(0)=3
x(2)=3
x((n-1))4
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 68
4) Time Reversal
)())(()())((
][][
kNXkXnNxnx
kXnx
N
DFT
N
DFT
−=− →←−=−
→←If
then
i.e. reversing the N-point sequence in time domain is
equivalent to reversing the DFT sequence
69.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 69
Problem
If x(n)= { 1 2 3 4} ,find X(k). Also using this result find the DFT of
h(n)={ 1 4 3 2}. Verify your answer with DFT calculation
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 71
Problem
If x(n)= { 1 2 3 4} ,find X(k). Also using this result find the DFT of
h(n)={ 1 -2 3 -4}. Verify your answer with DFT calculation
72.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 72
6) Symmetry properties
)()()()()( njxnjxnxnxnx o
I
e
I
o
R
e
R +++=
)()()()()( kjXkjXkXkXkX o
I
e
I
o
R
e
R +++=
EvenalEvenal DFT
,Re,Re →←
EvenaginaryEvenaginary DFT
,Im,Im →←
OddaginaryOddal DFT
,Im,Re →←
OddalOddaginary DFT
,Re,Im →←
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 75
Problem
2) Determine the missing value from following sequence
x(n)= { 1 3 _ 2 } if its DFT is X(k)={ 8 -1-j -2 -1+j}
1) x(n)= {1 2 3 1}. Prove parseval’s relation for this
sequence and its DFT .
76.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 76
8) Circular Convolution
][][
][][
22
11
kXnx
kXnx
DFT
DFT
→←
→←If
and
then
][].[][][ 2121 kXkXnxnx DFT
→←⊗
where
∑
−
=
−==⊗
1
0
21321 ))(()(][][][
N
k
Nknxkxnxnxnx
77.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 77
Circular convolution of two sequences
Circular convolution of sequences x1(n)={2 1 2 1} and x2(n)={1 2 3 4 }
x(0)=2x(2)=2
x(1)=1
x(3)=1
x1(n)
x(0)=1x(2)=3
x(1)=2
x(3)=4
x2(n)
x2(0)=1x2(2)=3
x2(3)=4
x2(1)=2
x2((-n)) 26
4
2
x1(n)x2((-n))
x3(0)=2+4+6+2
= 14
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 79
Problem
Find the circular convolution of sequences x1(n)={2 1 2 1} and
x2(n)={1 2 3 4 } using DFT .
Steps:
1. Find DFT of both sequences
2. Multiply both DFT’s
3. Take inverse DFT of product
( DFT product IDFT )
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 82
Contd..
X3(0)=60
X3(2)=-4
x3(0)=14
x3(1)=16
X3(1)=0
X3(3)=0
x3(2)=14
x3(3)=16
1
j
1−
j−1−
1−
X3(k)= X1(k).X2(k)= {60 0 -4 0}=
60-4=56
60+4=64
0+0=0
0-0=0
56+0=56
64-0=64
56-0=56
64+0=64
16)3(,14)2(,16)1(,14)0( 3333 ==== xxxx
IDFT( Twiddle factors in reverse
order and divide by N at the end)
1
--
4
83.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 83
Linear convolution using Circular convolution
Steps:
1. Append zeros to both sequence such that both sequence
will have same length of N1+N2-1
2. Number of zeros to be appended in each sequence is
addition of length of both sequences minus (one plus
length of respective sequence)
3. As both sequences are of same length equal to the length
of linear convoluted signal, apply circular convolution to
both modified signals using DFT ( DFT product IDFT )
84.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 84
Problem
Calculate the linear convolution of following signals by using DFT
method only. x(n)={ 1 2 3 2 -2} and h(n)={ 1 2 2 1}
Verify your answer with tabulation method.
85.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 85
Linear Filtering
If the system has frequency response H(w) and input
signal spectrum is X(w)
H(w)
X(w) Y(w)
Then , out spectrum of the system given by
Y(w)=H(w).X(w)
•In application, convolution would be used to calculate the
output of the system or DFT would be used to calculate the
spectrum of output.
•Even, DFT can be used for convolution
86.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 86
Contd..
•Instead of taking DFT/convolution for whole input sequence,
DFT/convolution can be applied to smaller blocks of input
sequence. This would yields two advantages
•DFT/convolution size would be smaller and hence
computational complexity
• In online filtering delay can be kept small as only small
number of points will required to store in buffer for
DFT/convolution calculations
•If the input length is very large as compared to impulse
response of the system, then computational complexity of
the DFT/convolution would be more.
•There are two methods to do linear filtering by braking up input
sequence into smaller blocks
• Overlap add method
• Overlap save method
87.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 87
Overlap-add Method
•In the overlap-add method the input x(n) is broken up into consecutive
non-overlapping blocks xi(n)
•The output yi(n) for each input xi(n) is computed separately by convolving
(non-cyclic/linear) xi(n) with h(n).
•The output blocks yi(n) would be lager than corresponding input blocks
xi(n)
•Hence, the each output block yi(n) will be overlapped with next and
previous blocks to get y(n)
88.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 88
Contd..
h(n)xi(n)
yi(n)
x(n)
y(n)
Adding overlapped points
Overlapping length=M-1
Length of each block= N
Length of impulse
response = M
Length of
each block=
N+M-1
89.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 89
Problem
An FIR digital filter has the unit impulse response sequence h(n)={ 2 2 1}.
Determine the output sequence in response to the input sequence x(n)= {3 0
-2 0 2 1 0 -2 -1 0}
Overlapping length=M-1
10/7/2009
e-TECHNote fromIRDC India
[email protected] 93
Overlap-save Method
h(n)xi(n)
yi(n)
x(n)
y(n)
Discard overlapped points
Overlapping length=M-1
Length of each block= N
Length of impulse
response = M
Length of
each block=
N+M-1
M-1 zeros
94.
10/7/2009
e-TECHNote from IRDCIndia
[email protected] 94
Problem
An FIR digital filter has the unit impulse response sequence h(n)={ 2 2 1}.
Determine the output sequence in response to the input sequence x(n)= {3 0
-2 0 2 1 0 -2 -1 0}