Introduction ECE 102
Introduction ECE 102
Introduction ECE 102
Signal – any physical quantity that varies with time, space or any other independent
variable/s.
ex. 1. ) 𝑠1 𝑡 = 5𝑡
2.) 𝑠2 𝑡 = 20𝑡 3
3.) 𝑠1 𝑡 = 3𝑥 + 2𝑥𝑦 + 10𝑦 2
4.) speech signal - represented by sum of general sinusoids of different amplitudes
frequencies
σ𝑁𝑖=1 𝐴𝑖 𝑡 𝑠𝑖𝑛 2𝜋𝐹𝑖 𝑡 + 𝜃𝑖 (𝑡)
where
𝐴𝑖 𝑡 - sets of amplitude
𝐹𝑖 𝑡 -sets of frequencies
𝜃𝑖 (𝑡) –sets of phase
5.) ECG – Electrocardiogram (heart)
6.) EEG – Electroencephalogram (heart)
Kinds of Signals according to Variables:
1. Function of single independent variables
ex. Time speech, ECG, EEG
2. Function of 2 independent variables
ex. Spatial coordinates, x & y such as image
2 kinds of systems:
a. Linear
b. nonlinear
B. Digital signal processing – analog signals are converted to digital signal first before
processing the digital signal
- can be done in software or hardware
- easy to alter/change since we will only do it in software
Analog Analog
Input A/D Digital D/A
converter Signal output
signal converter signal
processor
B. Digital signal processing – analog signals are converted to digital signal first before
processing the digital signal
- can be done in software or hardware
- easy to alter/change since we will only do it in software
Analog Analog
Input A/D Digital D/A
converter Signal output
signal converter signal
processor
Classifications of signals:
A. Multichannel and multidimensional signals
ex. 𝑠1 𝑡 = 𝐴𝑠𝑖𝑛3𝜋𝑡 - real- valued signal
𝐼𝑟 (𝑥, 𝑦, 𝑡) 3 – channel
𝐼 𝑥, 𝑦, 𝑡 = 𝐼𝑔 (𝑥, 𝑦, 𝑡) 3 - dimension
𝐼𝑏 (𝑥, 𝑦, 𝑡)
B. Continuous-Time vs. Discrete-Time Signals
1. Continuous – Time analog signal
for every value of time
ex. 𝑥1 𝑡 = 𝑐𝑜𝑠𝜋𝑡
𝑥2 𝑡 = 𝑒 − 𝑡 −∞ < 𝑡 < ∞
where A = amplitude
Ω = frequency, rad/s
𝜃 = phase, rad
a denotes analog signal
then
𝑇𝑝 = 1ൗ𝐹
𝐴𝑐𝑜𝑠𝜃
t
0
Properties of Analog Sinusoidal Signal:
1. Periodicity
1
𝑥𝑎 𝑡 + 𝑇𝑝 = 𝑥𝑎 (𝑡) where 𝑇𝑃 = 𝐹
𝑥𝑎 𝑡 = 𝐴𝑗(Ω𝑡+𝜃)
With
𝑒 ±𝑗𝜙 = 𝑐𝑜𝑠𝜙 ± 𝑗𝑠𝑖𝑛𝜙
Since 𝐴 𝐴
𝑥𝑎 𝑡 = 𝐴𝑐𝑜𝑠(Ω𝑡 + 𝜃 ) = 2 𝑒 +𝑗(Ω𝑡+𝜃) + 2 𝑒 −𝑗(Ω𝑡+𝜃)
Discrete-Time Sinusoidal Signal
𝑥𝑘 𝑛 = 𝐴𝑐𝑜𝑠 𝜔𝑘 𝑛 + 𝜃 k=0,1,2….
𝜔𝑘 = 𝜔0 + 2𝑘𝜋 − 𝜋 ≤ 𝜔𝑜 ≤ 𝜋
𝑥𝑘 𝑛 = 𝐴𝑐𝑜𝑠 𝜔𝑘 𝑛 + 2𝑘𝜋 + 𝜃
𝑐𝑜𝑠2𝑘𝜋 = 0
Then
𝑥𝑘 𝑛 = 𝐴𝑐𝑜𝑠 𝜔𝑜 𝑛 + 𝜃
3. The highest rate of oscillation in a discrete-time sinusoid is attained when 𝜔 = 𝜋
(or 𝜔 = −𝜋) or, equivalently, f = ½ or f = -1/2
𝑥 𝑛 = 𝑐𝑜𝑠𝜔0 𝑛
since 𝜔0 = 2𝜋𝑓
𝜔
then 𝑓 = 2𝜋0
for 𝜔0 = 𝜋Τ8
𝜋Τ 1
8
𝑓 = 2𝜋(1) = 16
Hence
1 1 1 1
𝑓0 = 0, 16 , 8 , 4 , 2
With periods:
𝑁 = ∞, 16,8,4,2
Consider
𝜔1 = 𝜔0
𝜔2 = 2𝜋 − 𝜔0
𝑥1 𝑛 = 𝐴𝑐𝑜𝑠𝜔1 𝑛 = 𝐴𝑐𝑜𝑠𝜔0 𝑛
𝑥2 𝑛 = 𝐴𝑐𝑜𝑠𝜔2 𝑛 = 𝐴𝑐𝑜𝑠 2𝜋 − 𝜔0 𝑛
=𝐴𝑐𝑜𝑠 2𝜋𝑛 − 𝜔0 𝑛
=𝐴𝑐𝑜𝑠2𝜋𝑛𝑐𝑜𝑠 −𝜔0 𝑛 − 𝑠𝑖𝑛2𝜋𝑛𝑠𝑖𝑛 −𝜔0 𝑛
=𝐴𝑐𝑜𝑠 −𝜔0 𝑛 =𝐴𝑐𝑜𝑠𝜔0 𝑛 = 𝑥1 𝑛
𝜔1 = 𝜔0 if 𝜋 < 𝜔1 < 2𝜋
then 𝜔2 = 2𝜋 − 𝜔0 is an alias of 𝜔1
𝑖𝑓 𝜔1 = 𝜋, 𝑡ℎ𝑒𝑛 𝜔0 = 𝜋, 𝜔2 = 2𝜋 − 𝜔0 = 2𝜋 − 𝜋 = 𝜋
if 𝜔1 = 2𝜋, 𝑡ℎ𝑒𝑛 𝜔0 = 2𝜋, 𝜔2 = 2𝜋 − 𝜔0 = 2𝜋 − 2𝜋 = 0
𝐴 𝑗(𝜔 ) 𝐴 −𝑗(𝜔 )
𝑥 𝑛 = 𝐴𝑐𝑜𝑠 𝜔𝑛 + 𝜃 = 𝑒 𝑛+𝜃 + 𝑒 𝑛+𝜃
2 2
Fundamental range:
0 < 𝜔 < 2𝜋 or -𝜋<𝜔 <𝜋
−1 1
0<𝑓<1 or < 𝑓 <
2 2
Continuous-time exponentials
𝑥𝑎 𝑡 = σ∞ ∞
𝑘=−∞ 𝑐𝑘 𝑠𝑘 𝑡 = σ𝑘=−∞ 𝑐𝑘 𝑒
𝑗𝑘Ω0 𝑡
𝑤ℎ𝑒𝑟𝑒 𝑐𝑘 , 𝑘 = 0, ±1, ±2, … are constant
Discrete-Time Exponentials
𝑁−1 𝑁−1
𝑥 𝑛 = 𝑐𝑘 𝑠𝑘 𝑛 = 𝑐𝑘 𝑒 𝑗2𝜋𝑘𝑛/𝑁
𝑘=0 𝑘=0
𝑐𝑘 − 𝑓𝑜𝑢𝑟𝑖𝑒𝑟 𝑐𝑜𝑒𝑓𝑓𝑖𝑐𝑒𝑛𝑡
Quantization error – difference between the quantized value and the sampled value
𝑥 𝑛 = 𝑥𝑎 𝑛𝑇 −∞<𝑛 <∞
Where 𝑥 𝑛 − 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 − 𝑡𝑖𝑚𝑒 𝑠𝑖𝑔𝑛𝑎𝑙
- sampled signal
𝑛
𝑡 = 𝑛𝑇 =
𝐹𝑠
Where t – time (sec)
n – number of samples
T – sampling period (sec)
Fs – sampling frequency (Hz)
Consider an analog sinusoidal signal:
𝑥𝑎 𝑡 = 𝐴𝑐𝑜𝑠(2𝜋𝐹𝑡 + 𝜃)
If sampled:
𝑥𝑎 𝑛𝑇 ≡ 𝑥(𝑛) = 𝐴𝑐𝑜𝑠(2𝜋𝐹𝑛𝑇 + 𝜃)
2𝜋𝑛𝐹
= 𝐴𝑐𝑜𝑠 +𝜃
𝐹𝑠
𝐹
If 𝑓=𝐹 or 𝜔 = Ω𝑇
𝑠
−∞ < 𝐹 < ∞
−∞ < Ω < ∞
1 and since
𝐹=𝑓
𝑇 −𝜋 < 𝜔 < 𝜋
and since then
1 1 −∞ < Ω < ∞
− <𝑓<
2 2
then 𝜔 𝜔
− <Ω<
𝑇 𝑇
−𝑓𝐹𝑠 < 𝐹 < 𝑓𝐹𝑠 1 1
1 1 1 1 − 𝜋 <Ω< 𝜋
− <𝐹< 𝑇 𝑇
2 𝑇 2 𝑇
𝜋 𝜋
1 1 − <Ω<
− <𝐹< 𝑇 𝑇
2𝑇 2𝑇
or or
𝐹𝑠 𝐹𝑠 −𝜋𝐹𝑠 < Ω < 𝜋𝐹𝑠
− <𝐹<
2 2
The highest value of F & Ω are:
𝐹𝑠 1
𝐹𝑚𝑎𝑥 = =
2 2𝑇
𝜋
Ω𝑚𝑎𝑥 = 𝜋𝐹𝑠 =
𝑇
Example: Consider the following analog sinusoidal signals:
𝑥1 𝑡 = 𝑐𝑜𝑠2𝜋 10 𝑡
𝑥2 𝑡 = 𝑐𝑜𝑠2𝜋 50 𝑡
Sampled at 𝐹𝑠 = 40𝐻𝑧
From
𝑥𝑎 𝑡 = 𝐴𝑐𝑜𝑠(2𝜋𝐹𝑡 + 𝜃)
𝑥𝑎 𝑛𝑇 ≡ 𝑥(𝑛) = 𝐴𝑐𝑜𝑠(2𝜋𝐹𝑛𝑇 + 𝜃)
2𝜋𝑛𝐹
= 𝐴𝑐𝑜𝑠 +𝜃
𝐹𝑠
assuming
𝐹𝑠 𝐹𝑠
− ≤ 𝐹0 ≤
2 2
The frequency range for discrete-time signals is
1 1
− < 𝑓0 <
2 2
for
𝑥𝑎 𝑡 = 𝐴𝑐𝑜𝑠(2𝜋𝐹𝑘 𝑡 + 𝜃)
where
𝐹𝑘 = 𝐹0 + 𝑘𝐹𝑠 , 𝑘 = ±1, ±2, …
𝐹𝑠 𝐹𝑠
Then 𝐹𝑘 is outside the fundamental frequency range − ≤ 𝐹0 ≤
2 2
and
𝐹𝑜 + 𝑘𝐹𝑠
𝑥 𝑛 ≡ 𝑥𝑎 𝑛𝑇 = 𝐴𝑐𝑜𝑠 2𝜋 𝑛+𝜃
𝐹𝑠
𝐹
= 𝐴𝑐𝑜𝑠 2𝜋𝑛 𝐹0 + 𝜃 + 2𝜋𝑘𝑛
𝑠
= 𝐴𝑐𝑜𝑠 2𝑛𝜋𝑓𝑜 + 𝜃
Aliasing
1 7
𝐹0 = 𝐻𝑧 𝑎𝑛𝑑 𝐹1 = − 𝐻𝑧 𝑎𝑟𝑒 𝑎𝑙𝑖𝑎𝑠𝑒𝑠 𝑜𝑓 𝐹𝑠 = 1𝐻𝑧
8 8
From
𝐹𝑘 = 𝐹0 + 𝑘𝐹𝑠 ,
7
With k=-1 and 𝐹1 = −
8
−7 1
𝐹0 = 𝐹1 + 𝐹𝑠 = + 1 = 𝐻𝑧
8 8
𝐹𝑠
Folding frequency - -> 𝑜𝑟 𝜔 = 𝜋
2
𝑥𝑎 𝑡 = 3𝑐𝑜𝑠(100𝜋𝑡)
a. Determine the minimum sampling rate required to avoid aliasing
Soln:
𝑥𝑎 𝑡 = 3𝑐𝑜𝑠2𝜋(50)𝑡 𝐹 = 50𝐻𝑧
𝐹𝑠 𝐹𝑠
From − ≤𝐹 ≤
2 2
Hence 𝐹𝑠 = 2 50𝐻𝑧 = 100𝐻𝑧 Minimum sampling rate
b. Suppose that the signal is sampled at the rate 𝐹𝑠 = 200𝐻𝑧. What is the
discrete-time signal obtained after sampling?
2𝜋𝑛𝐹
Soln: From 𝑥(𝑛) = 𝐴𝑐𝑜𝑠 +𝜃
𝐹𝑠
2𝜋(50) 𝜋
𝑥(𝑛) = 3 cos 𝑛 = 3𝑐𝑜𝑠 𝑛
200 2
c. Suppose that the signal is sampled at the rate 𝐹𝑠 = 75𝐻𝑧. What is the discrete-time
signal obtained after sampling?
Soln: 2𝜋(50) 4𝜋
𝑥(𝑛) = 3 cos 𝑛 = 3𝑐𝑜𝑠 𝑛
75 3
2𝜋
= 3𝑐𝑜𝑠 2𝜋 − 3 𝑛
2𝜋
= 3cos 3 n
𝐹𝑠
d. What is the frequency 0 < 𝐹 < of a sinusoid that yields samples identical to those
2
obtained in part c?
Soln:
For 𝐹𝑠 = 75𝐻𝑧
𝐹 = 𝑓𝐹𝑠 = 75𝑓
1
The frequency of the sinusoid in part c is 𝑓 = 3
Hence 1
𝐹 = 𝑓𝐹𝑠 = 75𝑓 = 75
3
= 25𝐻𝑧
From 𝐹𝑠 𝐹𝑠
− ≤𝐹 ≤
2 2
𝐹1 𝑡 = 25 𝐻𝑧 𝐹2 𝑡 = 150 𝐻𝑧 𝐹3 𝑡 = 50 𝐻𝑧
And
𝐹𝑠 > 2𝐹𝑚𝑎𝑥 = 2 150 𝐻𝑧 = 300𝐻𝑧
𝐹𝑁 = 2𝐹𝑚𝑎𝑥 = 300𝐻𝑧
Example: Consider the analog signal
𝑥𝑎 𝑡 = 3𝑐𝑜𝑠2000𝜋𝑡 + 5𝑠𝑖𝑛6000𝜋𝑡 + 10𝑐𝑜𝑠12,000𝜋𝑡
And
𝐹𝑠 > 2𝐹𝑚𝑎𝑥 = 2 6 𝐾𝐻𝑧 = 12𝐾𝐻𝑧
𝐹𝑁 = 2𝐹𝑚𝑎𝑥 = 12𝐾𝐻𝑧