Introduction to Digital Signal Processing
Download
Report
Transcript Introduction to Digital Signal Processing
About this Course
Subject:
◦ Digital Signal Processing
◦ EE 541
Textbook
◦ Discrete Time Signal Processing
◦
A. V. Oppenheim and R. W. Schafer, Prentice Hall, 3rd Edition
Reference book
◦ Probability and Random Processes with Applications to Signal Processing
◦
Henry Stark and John W. Woods, Prentice Hall, 3rd Edition
Course website
◦ http://sist.shanghaitech.edu.cn/faculty/luoxl/class/2014Fall_DSP/DSPclass.htm
◦ Syllabus, lecture notes, homework, solutions etc.
About this Course
Grading details:
◦
◦
◦
◦
Homework: (Weekly) 20%
Midterm: 30%
Final: 30%
Project: 20%
Final Score
20%
20%
Homework
Midterm
Final
30%
30%
Project
Matlab
Powerful software you will like for the rest of your time in
ShanghaiTech SIST
Ideal for practicing the concepts learnt in this class and doing the final
projects
About the Lecturer
Name: Xiliang Luo (罗喜良)
Research interests:
◦ Wireless communication
◦ Signal processing
◦ Information theory
More information:
◦ http://sist.shanghaitech.edu.cn/faculty/luoxl/
About TA
Name: 裴东
Contact: [email protected]
Office hour: Friday, 6-8pm,
Some survey
background
coolest thing you have ever done
what you want to learn from this course?
Lecture 1:
Introduction to
DSP
XILIANG LUO
2014/9
Signals and Systems
Signal
1
something conveying information
0.5
Amplitude
speech signal
video signal
communication signal
0
-0.5
continuous time
-1
chirp
0
0.2
0.4
discrete time
digital signal : not only time is discrete, but also is the amplitude!
0.6
0.8
Time (secs)
1
1.2
1.4
1.6
Discrete Time Signals
Mathematically, discrete-time signals can be expressed as a sequence of
numbers
𝑥 𝑛 ,𝑛 ∈ 𝑍
In practice, we obtain a discrete-time signal by sampling a continuoustime signal as:
𝑥 𝑛 = 𝑥𝑎 (𝑛𝑇)
where T is the sampling period and the sampling frequency is defined as
1/T
Speech Signal
Question:
1. What is the sampling frequency?
2. Are we losing anything here by sampling?
Some Basic Sequences
Unit Sample Sequence
0, 𝑛 ≠ 0
𝛿 𝑛 =
1, 𝑛 = 0
Unit Step Sequence
𝛿𝑛 =
0, 𝑛 < 0
1, 𝑛 ≥ 0
Some Basic Sequences
Sinusoidal Sequence
x 𝑛 = 𝐴 cos(𝜔0 𝑛 + 𝜙)
Question:
1. Is discrete sinusoidal periodic?
2. What is the period?
Question:
Cos(pi/4xn) vs Cos(7pi/4xn), which
One has faster oscillation?
Some Basic Sequences
Sinusoidal Sequence
Question:
Cos(pi/4xn) vs Cos(7pi/4xn), which
One has faster oscillation?
x 𝑛 = 𝐴 cos(𝜔0 𝑛 + 𝜙)
1
/4
0.8
7/4
0.6
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
0
2
4
6
8
10
12
14
16
18
20
Discrete-Time Systems
a transformation or operator mapping discrete time input to discrete time output
𝑦 𝑛 = 𝑇{𝑥[𝑛]}
Example: ideal delay system
y[n] = x[n-d]
Example: moving average
y[n] = average{x[n-p],….,x[n+q]}
Memoryless System
Definition: output at time n depends only on the input at the sample
time n
𝑦 𝑛 =𝑥 𝑛
Question:
Are the following memoryless?
1. y[n] = x[n-d]
2. y[n] = average{x[n-p], …, x[n+q]}
2
Linear System
Definition: systems satisfying the principle of superposition
𝑇 𝑥1 𝑛 + 𝑥2 𝑛
= 𝑇 𝑥1 [𝑛] + 𝑇{𝑥2 [𝑛]}
𝑇 𝑎𝑥[𝑛] = 𝑎𝑇 𝑥[𝑛]
𝑇 𝑎𝑥1 𝑛 + 𝑏𝑥2 𝑛
= 𝑎𝑇 𝑥1 [𝑛] + 𝑏𝑇{𝑥2 [𝑛]}
Additivity Property
Scaling Property
Superposition Principle
Time-Invariant System
A.k.a. shift-invariant system: a time shift in the input causes a
corresponding time shift in the output:
𝑇 𝑥[𝑛] = 𝑦[𝑛]
Question:
Are the following time-invariant?
1. y[n] = x[n-d]
2. y[n] = x[Mn]
𝑇 𝑥[𝑛 − 𝑑] = 𝑦[𝑛 − 𝑑]
Causality
The output of the system at time n depends only on the input
sequence at time values before or at time n;
Is the following system causal?
y[n] = x[n+1] – x[n]
Stability: BIBO Stable
A system is stable in the Bounded-Input, Bounded-Output (BIBO)
sense if and only if every bounded input sequence produces a bounded
output sequence.
A sequence is bounded if there exists a fixed positive finite value B
such that:
𝑥 𝑛 ≤𝐵<∞
LTI Systems
LTI : both Linear and Time-Invariant systems
convenient representation: completely characterized by its impulse
response
significant signal-processing applications
Impulse response
ℎ 𝑛 = 𝑇{𝛿[𝑛]}
LTI System
𝑥𝑛 =
𝑥 𝑘 𝛿[𝑛 − 𝑘]
𝑘
𝑦 𝑛 =𝑇
𝑥 𝑘 𝛿[𝑛 − 𝑘] =
𝑘
𝑥 𝑘 𝑇{𝛿 𝑛 − 𝑘 ] =
𝑘
𝑥 𝑘 ℎ[𝑛 − 𝑘]
𝑘
LTI System
LTI system is completely characterized by its impulse response as
follows:
ℎ 𝑛 = 𝑇{𝛿[𝑛]}
𝑦𝑛 =
𝑥 𝑘 ℎ 𝑛−𝑘
𝑘
≜ 𝑥 𝑛 ∗ ℎ[𝑛]
convolution sum
Properties of LTI Systems
Commutative:
𝑥 𝑛 ∗ ℎ 𝑛 = ℎ 𝑛 ∗ 𝑥[𝑛]
Distributive:
𝑥 𝑛 ∗ ℎ1 𝑛 + ℎ2 𝑛
Associative:
= 𝑥 𝑛 ∗ ℎ1 𝑛 + 𝑥 𝑛 ∗ ℎ2 [𝑛]
(𝑥 𝑛 ∗ ℎ1 𝑛 ) ∗ ℎ2 𝑛 = 𝑥 𝑛 ∗ (ℎ1 𝑛 ∗ ℎ2 [𝑛])
Properties of LTI Systems
Equivalent systems:
Properties of LTI Systems
Equivalent systems:
Stability of LTI System
LTI systems are stable if and only if the impulse response is absolutely
summable:
+∞
|ℎ[𝑘]| < ∞
𝑘=−∞
sufficient condition
need to verify bounded input will have also bounded output under this condition
necessary condition
need to verify: stable system the impulse response is absolutely summable
equivalently: if the impulse response is not absolutely summable, we can prove the system is
not stable!
Stability of LTI System
Prove: if the impulse response is not absolutely summable, we can
define the following sequence:
ℎ∗ [−𝑛]
, ℎ −𝑛 ≠ 0
𝑥 𝑛 = |ℎ[−𝑛]|
0, ℎ −𝑛 = 0
x[n] is bounded clearly
when x[n] is the input to the system, the output can be found to be the
following and not bounded:
𝑦0 =
𝑥 𝑘 ℎ −𝑘 =
ℎ𝑘 2
|ℎ[𝑘]|
Some Convolution Examples
what is the resulting shape?
Matlab cmd: conv()
1
0.9
0.8
10
0.7
0.6
9
0.5
8
0.4
0.3
7
0.2
0.1
0
6
1
2
3
4
5
6
7
8
9
10
5
1
0.9
4
0.8
3
0.7
0.6
2
0.5
0.4
1
0.3
0.2
0
0.1
0
1
2
3
4
5
6
7
8
9
10
0
2
4
6
8
10
12
14
16
18
20
Some Convolution Examples
what is the resulting shape?
10
9
700
8
7
600
6
5
500
4
3
2
400
1
0
0
2
4
6
8
10
12
14
16
18
20
300
10
9
8
200
7
6
100
5
4
0
3
2
1
0
0
2
4
6
8
10
12
14
16
18
20
0
5
10
15
20
25
30
35
40
Some Convolution Examples
10
9
40
8
what is the freq here?
7
30
6
5
4
20
3
2
10
1
0
0
2
4
6
8
10
12
14
16
18
20
0
1
0.8
0.6
-10
0.4
0.2
𝑛𝜋
sin( )
8
0
-0.2
-0.4
-0.6
-0.8
-1
0
20
40
60
80
100
120
-20
-30
0
20
40
60
80
100
120
Frequency Domain
Representation
Eigenfunction for LTI Systems
complex exponential functions are the eigenfunction of all LTI systems
𝑦 𝑛 = 𝑒 𝑗𝜔𝑛 ∗ ℎ 𝑛 =
ℎ 𝑘 𝑒 𝑗𝜔
𝑘
𝐻(𝑒 𝑗𝜔 ) =
ℎ 𝑘 𝑒 −𝑗𝜔𝑘
𝑘
𝑦 𝑛 = 𝐻 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛
𝑛−𝑘
= 𝑒 𝑗𝜔𝑛 ×
ℎ 𝑘 𝑒 −𝑗𝜔𝑘
𝑘
Frequency Response of LTE
Systems
For an LTI system with impulse response h[n], the frequency response
is defined as:
𝐻(𝑒 𝑗𝜔 ) =
ℎ 𝑘 𝑒 −𝑗𝜔𝑘
𝑘
In terms of magnitude and phase:
𝐻(𝑒 𝑗𝜔 ) = 𝐻 𝑒 𝑗𝜔 𝑒 ∠𝐻(𝑒
𝑗𝜔 )
magnitude response
phase response
Frequency Response of Ideal
Delay
ℎ 𝑛 = 𝛿[𝑛 − 𝑛𝑑 ]
8
-2
6
𝐻 𝑒 𝑗𝜔 =
𝛿 𝑛 − 𝑛𝑑 𝑒 −𝑗𝜔𝑛 = 𝑒 −𝑗𝜔𝑛𝑑
4
phase response
𝑛
2
0
-2
-4
-6
-8
-4
-3
-2
-1
0
1
2
3
4
Frequency Response for a Real
IR
For real impulse response, we can have:
𝐻 𝑒 −𝑗𝜔 = 𝐻 ∗ (𝑒 𝑗𝜔 )
why?
Response to a sinusoidal of an LTI with real impulse response
𝑥 𝑛 = Acos(𝜔0 𝑛 + 𝜙 ) =
𝑦𝑛 =
=
𝐴 𝑗(𝜙+𝜔 𝑛) 𝐴 −𝑗(𝜙+𝜔 𝑛)
0
0
𝑒
+ 𝑒
2
2
𝐴
𝐴
𝐻 𝑒 𝑗𝜔𝑜 𝑒 𝑗(𝜙+𝜔0𝑛) + 𝐻(𝑒 −𝑗𝜔0 )𝑒 −𝑗(𝜙+𝜔0𝑛)
2
2
𝐴
𝑗
|𝐻 𝑒 𝑗𝜔𝑜 |𝑒
2
𝜙+𝜔0 𝑛+∠𝐻 𝑒 𝑗𝜔𝑜
+
𝐴
|𝐻 𝑒 𝑗𝜔0 |𝑒 −𝑗(𝜙+𝜔0𝑛+∠𝐻
2
= 𝐻 𝑒 𝑗𝜔𝑜 𝐴 cos(𝜔0 𝑛 + 𝜙 + ∠𝐻(𝑒 𝑗𝜔0 ))
𝑒 𝑗𝜔𝑜 )
Frequency Response Property
Frequency response is periodic with period 2π
fundamentally, the following two discrete frequencies are indistinguishable
𝜔, 𝜔 + 2𝜋
We only need to specify frequency response over an interval of length
2π : [- π, + π];
In discrete time:
low frequency means: around 0
high frequency means: around +/- π
Frequency Response of Typical
Filters
low pass
band-stop
high pass
band-pass
Representation of Sequences
by FT
Many sequences can be represented by a Fourier integral as follows:
1
𝑥𝑛 =
2𝜋
𝜋
𝑋 𝑒 𝑗𝜔 𝑒 𝑗𝜔𝑛 𝑑𝜔
Synthesis: Inverse Fourier Transform
𝑥[𝑛] 𝑒 −𝑗𝜔𝑛
Analysis: Discrete-Time Fourier Transform
−𝜋
𝑋 𝑒 𝑗𝜔 =
𝑛
x[n] can be represented as a superposition of infinitesimally small complex
exponentials
Fourier transform is to determine how much of each frequency component
is used to synthesize the sequence
Prove it!
Convergence of Fourier
Transform
A sufficient condition: absolutely summable
it can be shown the DTFT of absolutely summable sequence converge
uniformly to a continuous function
Square Summable
A sequence is square summable if:
∞
𝑥[𝑛]
2
<∞
𝑛=−∞
For square summable sequence, we have mean-square convergence:
Ideal Lowpass Filter
DTFT of Complex Exponential
Sequence
Let a Fourier Transform function be:
Now, let’s find the synthesized sequence with the above Fourier
Transform:
Symmetry Properties of DTFT
Conjugate Symmetric Sequence
𝑥𝑒 𝑛 = 𝑥𝑒∗ [−𝑛]
Real even sequence
Conjugate Anti-Symmetric Sequence
𝑥𝑜 𝑛 = −𝑥𝑜∗ [−𝑛]
Real odd sequence
Any sequence can be expressed as the sum of a CSS and a CASS as
𝑥 𝑛 = 𝑥𝑒 𝑛 + 𝑥𝑜 [𝑛]
How?
Symmetry Properties of DTFT
DTFT of a conjugate symmetric sequence is conjugate symmetric
DTFT of a conjugate anti-symmetric sequence is conjugate antisymmetric
Any real sequence’s DTFT is conjugate symmetric
Fourier Transform Theorems
Time shifting and frequency shifting theorem
Prove it!
Fourier Transform Theorems
Time Reversal Theorem
Prove it!
Fourier Transform Theorems
Differentiation in Frequency Theorem
Prove it!
Fourier Transform Theorems
Parseval’s Theorem: time-domain energy = freq-domain energy
HW Problem 2.84: Prove a more general format
Fourier Transform Theorems
Convolution Theorem
Prove it!
Fourier Transform Theorems
Windowing Theorem
Prove it!
Discrete-Time Random Signals
Wide-sense stationary random process (assuming real)
𝜙𝑥𝑥 𝑛, 𝑚 = 𝐸 𝑥 𝑛 𝑥[𝑛 + 𝑚] = 𝜙𝑥𝑥 [𝑚]
autocorrelation function
Consider an LTE system, let x[n] be the input, which is WSS, the output
is denoted as y[n], we can show y[n] is WSS also
Discrete-Time Random Signals
WSS in, WSS out
Discrete-Time Random Signals
WSS in, WSS out
Discrete-Time Random Signals
WSS in, WSS out
Power Spectrum Density
band-pass
White Noise
Very widely utilized concept in communication and signal processing
A white noise is a signal for which:
𝜙𝑥𝑥 𝑚 = 𝜎𝑥2 𝛿[𝑚]
Φ𝑥𝑥 𝑒 𝑗𝜔 = 𝜎𝑥2
From its PSD, we can see the white noise has equal power distribution
over all frequency components
Often we will encounter the term: AWGN, which stands for: additive
white Gaussian noise
the underlying random noise is Gaussian distributed
Review
LTI system
Frequency Response
Impulse Response
Causality
Stability
Discrete-Time Fourier Transform
WSS
PSD
Homework Problems
2.11 Given LTI frequency response, find the output when input a
sinusoidal sequence …
2.17 Find DTFT of a windowed sequence …
2.22 Period of output given periodic input …
2.40 Determine the periodicity of signals …
2.45 Cascade of LTE systems …
2.51 Check whether system is linear, time-invariant …
2.63 Find alternative system …
2.84 General format of Parseval’s theorem …
Try to use Matlab to plot the sequences and results when required
Next Week
Z – Transform
Please read the textbook Chapter 3 in advance!