Lecture 03 - Frequency Response and DTFT
Lecture 03 - Frequency Response and DTFT
Machine Vision
Lecture 03 – Frequency Response and DTFT
R . A . P R A B H AT H B U D D H I K A
D E PA R T M E N T O F E L E C T R I C A L , E L E C T R O N I C A N D S Y S T E M S E N G I N E E R I N G
FA C U LT Y O F E N G I N E E R I N G
NSBM GREEN UNIVERSITY
Periodic Sequences
A sequence is said to be periodic if it satisfies the following condition.
2022 2
Exercise – Find the period of the
following sequence.
𝑛𝜋
𝑥𝑛 = cos[ ]
2
2022 3
Sinusoidal Sequences
A special class of Sequences that is extensively used in signal processing is sinusoidal Sequences.
In continuous domain
𝑥 𝑡 = 𝐴𝑐𝑜𝑠 𝜔𝑡
Angular or circular frequency, 𝜔 is related to linear frequency, 𝑓 by 𝜔 = 2𝜋𝑓.
Hence,
𝑥(𝑡) = 𝐴𝑐𝑜𝑠(2𝜋𝑓𝑡)
Suppose a sampling frequency 𝑓𝑠 is used to sample this signal and convert it to discrete:
Then, 𝑇𝑠 is the sampling period given by 𝑇𝑠 = 1/𝑓𝑠
𝑥 𝑛 = 𝐴𝑐𝑜𝑠[2𝜋𝑓 ∗ 𝑛𝑇𝑠 ]
2022 4
Sinusoidal Sequences
This is the same as:
2𝜋𝑓𝑛
𝑥𝑛 = 𝐴𝑐𝑜𝑠[ ]
𝑓𝑠
𝑓
If 𝑥[𝑛] must be periodic, must be a rational number.
𝑓𝑠
𝑓 𝑘
That is: = where 𝑘, 𝑁 ∈ 𝑍
𝑓𝑠 𝑁
2022 5
Exercise
Find out the sequence resulted after sampling the given sinusoidal signal at a sampling frequency
of 8Hz.
𝑥 𝑡 = 2𝑐𝑜𝑠 2𝜋𝑡
List the first seventeen samples of the resulting sequence.
2022 6
Solution
𝑥[𝑛] = 2𝑐𝑜𝑠 2𝜋 ∗ 𝑛/𝑓𝑠
𝜋𝑛
𝑥 𝑛 = 2cos[ ]
3 4
1
x[n] = 2cos[pi*n/4]
-1
-2
-3
0 2 4 6 8 10 12 14 16 18
n
2022 7
Complex sinusoidal signals
A complex sinusoidal signal has the following form.
𝑥(𝑡) = 𝐴𝑒 𝑗𝜔𝑡
Where
𝜔 is an angular frequency
𝑗= −1
𝐴 is a real number
By Euler’s formula:
𝑥 𝑡 = 𝐴𝑐𝑜𝑠 𝜔𝑡 + 𝑗𝐴𝑠𝑖𝑛(𝜔𝑡)
2022 8
Complex sinusoidal signals
A discrete version of the complex sinusoidal signal can be obtained as follows.
Sampling period is 𝑇𝑠 .
𝑥 𝑛 = 𝐴𝑒 𝑗𝜔∗𝑛𝑇𝑠
𝑥 𝑛 = 𝐴𝑒 𝑗𝛺𝑛
Where 𝛺 = 𝜔𝑇𝑠 which is often called the digital frequency.
2022 9
Frequency Response of an LTI System
Suppose an LTI system has an impulse response ℎ[𝑛].
If this system is excited by a complex sinusoidal input, 𝑒 𝑗𝛺𝑛 the output, 𝑦[𝑛] becomes:
𝑦 𝑛 = ℎ 𝑛 ∗ 𝑒 𝑗𝛺𝑛
+∞
𝑦 𝑛 = ℎ[𝑘]𝑒 𝑗𝛺(𝑛−𝑘)
𝑘=−∞+∞
2022 10
Frequency Response of an LTI System
+∞
+∞
Frequency Response 𝐻 𝑒 𝑗𝛺 = ℎ[𝑘]𝑒 −𝑗𝛺𝑘
𝑘=−∞
2022 11
Frequency Response of an LTI System
Now we can write the following:
𝑦 𝑛 = 𝐻(𝑒 𝑗𝛺 )𝑒 𝑗𝛺𝑛
Frequency response of the system is complex and hence:
Magnitude = 𝐻(𝑒 𝑗𝛺 )
Phase = arg(𝐻 𝑒 𝑗𝛺 )
Further:
2022 12
Frequency Response of an LTI System
The frequency response 𝐻(𝑒 𝑗𝛺 ) is the change in the amplitude and phase, when a complex sinusoidal input is
applied to an LTI system.
Thus,
𝑦 𝑛 = 𝑇{𝑒 𝑗𝛺𝑛 }
Whereas,
𝑦 𝑛 = 𝐻(𝑒 𝑗𝛺 )𝑒 𝑗𝛺𝑛
This means the effect of applying a complex sinusoidal input to the LTI system is the same as multiplying it by the
quantity 𝐻(𝑒 𝑗𝛺 ).
Therefore, 𝑒 𝑗𝛺𝑛 is an Eigen function of the LTI system and the corresponding Eigen value is 𝐻(𝑒 𝑗𝛺 ).
Likewise, the convolution has reduced to a multiplication.
2022 13
Frequency Response of an LTI System
The frequency response 𝐻(𝑒 𝑗𝛺 ) is the change in the amplitude and phase, when a complex sinusoidal input is
applied to an LTI system.
Thus,
𝑦 𝑛 = 𝑇{𝑒 𝑗𝛺𝑛 }
Whereas,
𝑦 𝑛 = 𝐻(𝑒 𝑗𝛺 )𝑒 𝑗𝛺𝑛
𝑦[𝑛] = 𝐻(𝑒 𝑗𝛺 )𝑒 𝑗𝛺𝑛 = 𝐻(𝑒 𝑗𝛺 ) 𝑒 𝑗𝛺𝑛 = 𝐻(𝑒 𝑗𝛺 )
𝑝ℎ𝑎𝑠𝑒 𝑦 𝑛 = arg 𝐻 𝑒 𝑗𝛺 𝑒 𝑗𝛺𝑛 = arg 𝐻 𝑒 𝑗𝛺 + arg 𝑒 𝑗𝛺𝑛
Therefore
𝑗𝛺 𝑗(𝛺𝑛+arg(𝐻(𝑒 𝑗𝛺 )))
𝑦 𝑛 = 𝐻(𝑒 ) 𝑒
2022 14
Example
Find the frequency response of ideal delay system.
𝑦 𝑛 = 𝑥 𝑛 − 𝑛𝑑
Also find the followings of the frequency response you found.
1. Real part
2. Imaginary part
3. Magnitude
4. Phase
2022 15
Solution – Method one
Let 𝑥 𝑛 = 𝑒 𝑗𝛺𝑛
Then 𝑦 𝑛 = 𝑒 𝑗𝛺(𝑛−𝑛𝑑)
𝑦 𝑛 = 𝑒 −𝑗𝛺𝑛𝑑 𝑒 𝑗𝛺𝑛
𝑦 𝑛 = 𝐻(𝑒 𝑗𝛺 )𝑒 𝑗𝛺𝑛
Hence,
𝑗𝛺
𝐻(𝑒 ) = 𝑒 −𝑗𝛺𝑛𝑑
2022 16
Solution – Method two
Impulse response of the ideal delay system is:
𝑦 𝑛 = 𝑥[𝑛 − 𝑛𝑑 ]ȁ 𝑥 𝑛 =𝛿 𝑛
Thus, ℎ 𝑛 = 𝛿 𝑛 − 𝑛𝑑
𝑗𝛺 +∞
Therefore, 𝐻 𝑒 = σ𝑘=−∞ 𝛿 𝑘 − 𝑛𝑑 𝑒 −𝑗𝛺𝑘
𝑗𝛺 −𝑗𝛺𝑛𝑑
𝐻 𝑒 = 𝑒
2022 17
Solution continued
Real part
𝑟𝑒𝑎𝑙 𝐻 𝑒 𝑗𝛺 = 𝑟𝑒𝑎𝑙 𝑒 −𝑗𝛺𝑛 𝑑 = cos(𝛺𝑛𝑑 )
Imaginary part
𝑖𝑚𝑎𝑔 𝐻 𝑒 𝑗𝛺 = 𝑖𝑚𝑎𝑔 𝑒 −𝑗𝛺𝑛 𝑑 = −sin(𝛺𝑛𝑑 )
Magnitude
𝐻 𝑒 𝑗𝛺 = 𝑒 −𝑗𝛺𝑛 𝑑 =1
Phase
arg 𝐻 𝑒 𝑗𝛺 = −𝛺𝑛𝑑
2022 18
Frequency domain representation of
signals and LTI systems
oNow that we have seen the response of an LTI system to a complex sinusoidal input is the
multiplication of the input by the frequency response of the LTI system.
oIf we can represent any signal, 𝑥[𝑛] as a weighted superposition of complex sinusoids, the
output of an LTI system 𝑦[𝑛] for 𝑥[𝑛] must be a superposition of weighted sinusoids scaled by
the frequency response of the system.
oThis provides us with an easy way of visualizing insights of signals and systems.
2022 19
Types of Fourier Transforms
Periodic Aperiodic
2022 20
Discrete Time Fourier Transform - DTFT
For a sequence 𝑥[𝑛] its DTFT 𝑋(𝑒 𝑗𝛺 )is defined as follows.
+∞
𝑋 𝑒 𝑗𝛺 = 𝑥[𝑛]𝑒 −𝑗𝑛𝛺
𝑛=−∞
2022 21
Example
Find the DTFT of the following sequence.
5
𝑥 𝑛 = 3,2,1,0, −1, −2, −3, −4, −5 𝑛=−3
2022 22
DTFT is periodic with period 2𝜋
+∞
𝑋 𝑒 𝑗𝛺 = 𝑥[𝑛]𝑒 −𝑗𝑛𝛺
𝑛=−∞
+∞
2022 23
Inverse DTFT
Given the DTFT of a sequence, the sequence can be found by inverse DTFT.
−1 𝑗𝛺
1
𝐷𝑇𝐹𝑇 𝑋(𝑒 ) = 𝑥 𝑛 = න 𝑋(𝑒 𝑗𝛺 )𝑒 𝑗𝑛𝛺 𝑑𝛺
2𝜋 2𝜋
2022 24
DTFT of Unit Impulse
+∞
𝐷𝑇𝐹𝑇 𝛿 𝑛 =1
2022 25
DTFT of Shifted Unit Impulse
+∞
𝐷𝑇𝐹𝑇 𝛿 𝑛 − 𝑚 = 𝑒 −𝑗𝑚𝛺
2022 26
DTFT of Geometric Series
+∞
𝐷𝑇𝐹𝑇 𝑎𝑛 𝑢 𝑛 = 𝑎𝑛 𝑒 −𝑗𝑛𝛺
𝑛=0
+∞
𝐷𝑇𝐹𝑇
𝑥𝑛 𝑋(𝑒 𝑗𝛺 )
𝐷𝑇𝐹𝑇
𝑦𝑛 𝑌(𝑒 𝑗𝛺 )
2022 28
Properties of DTFT – Linearity
𝐷𝑇𝐹𝑇
𝑗𝛺 𝑗𝛺
𝑎𝑥 𝑛 + 𝑏𝑦 𝑛 𝑎𝑋 𝑒 + 𝑏𝑌(𝑒 )
2022 29
Properties of DTFT – Time Shifting
𝐷𝑇𝐹𝑇
−𝑗𝛺𝑛0 𝑗𝛺
𝑥 𝑛 − 𝑛0 𝑒 𝑋 𝑒
2022 30
Properties of DTFT – Frequency shifting
𝐷𝑇𝐹𝑇
𝑗𝛺0 𝑛 𝑗(𝛺−𝛺0
𝑒 𝑥𝑛 𝑋 𝑒
2022 31
Properties of DTFT - Conjugation
𝐷𝑇𝐹𝑇
∗ ∗ −𝑗𝛺
𝑥 𝑛 𝑋 𝑒
2022 32
Properties of DTFT – Time Reversal
𝐷𝑇𝐹𝑇
−𝑗𝛺
𝑥 −𝑛 𝑋 𝑒
2022 33
Properties of DTFT - Convolution
𝐷𝑇𝐹𝑇
𝑗𝛺 𝑗𝛺
𝑥 𝑛 ∗𝑦 𝑛 𝑋 𝑒 𝑌(𝑒 )
2022 34
Properties of DTFT - Multiplication
𝐷𝑇𝐹𝑇 1
𝑥𝑛𝑦𝑛 න 𝑋 𝑒 𝑗𝜉 𝑌(𝑒 𝑗𝛺−𝜉 ) 𝑑𝜉
2𝜋 2𝜋
2022 35
Properties of DTFT – Time differencing
𝐷𝑇𝐹𝑇
−𝑗𝛺 𝑗𝛺
𝑥 𝑛 +𝑥 𝑛−1 (1 − 𝑒 )𝑋 𝑒
2022 36
Properties of DTFT – Frequency
differentiation
𝐷𝑇𝐹𝑇 𝑑 𝑗𝛺
𝑛𝑥 𝑛 𝑗 𝑋 𝑒
𝑑𝛺
2022 37
DTFT of a discrete rectangular pulse
Prove the following.
1, 𝑖𝑓 𝑛 < 𝑁
If 𝑥 𝑛 = ቊ
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
1
𝐷𝑇𝐹𝑇 sin(𝛺(𝑁 + 2))
𝑥𝑛
sin(𝛺/2)
2022 38
Exercise
Using the above proof find the DTFT of the sequence given below.
𝑥 𝑛 = {1,1,1,3,3,3,1,1,1}4𝑛=−4
2022 39
More DTFT pairs and properties
A full list of DTFT pairs and DTFT properties can be found on course page.
2022 40