Professional Documents
Culture Documents
1 Kundur IntroDSP Handouts
1 Kundur IntroDSP Handouts
University of Toronto John G. Proakis and Dimitris G. Manolakis, Digital Signal Processing:
Principles, Algorithms, and Applications, 4th edition, 2007.
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 1 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 2 / 51
Chapter 1: Introduction 1.1 Signals, Systems and Signal Processing Chapter 1: Introduction 1.1 Signals, Systems and Signal Processing
I Signal:
I any physical quantity that varies with time, space, or any other I A signal can be represented as a function x(t) and consists of:
independent variable or variables 1. one or more dependent variable components (e.g., air pressure
I Examples: pressure as a function of altitude, sound as a x, R-G-B color [x1 x2 x3 ]T );
function of time, color as a√function of space, . . . 2. one or more independent variables (e.g., time t, 3-D spacial
I x(t) = cos(2πt), x(t) = 4 t + t 3 , x(m, n) = (m + n)2 location (s1 , s2 , s3 )).
I System:
I a physical device that performs an operation on a signal
I Examples: analog amplifier, noise canceler, communication Please note: in this course we will typically use time t to
channel, transistor, . . . represent the independent variable although in general it can
I y (t) = −4x(t), dydt(t) + 3y (t) = − dx(t)
dt + 6x(t),
correspond to any other type of independent variable.
y (n) − 12 y (n − 2) = 3x(n) + x(n − 2)
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 3 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 4 / 51
Chapter 1: Introduction 1.2 Classification of Signals Chapter 1: Introduction 1.2 Classification of Signals
t t
0.5
-4
province.
-3 -2 -1 1 2 3 4 -4 -3 -2 -1 0.5 1 1.5 2 2.5 3 4
-2 -2
x(t) x(t)
2 2
x[n] x[n]
1
-4 -3 -2 -1 1 2 3 4
t -4 -3 -2 -1
0.5
x[n] x[n]
1 2
1 1
-3 -2 -1 0 1 2 3
n -3 -2 -1 0 1 2 3
n
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 5 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 6 / 51
Chapter 1: Introduction 1.2 Classification of Signals Chapter 1: Introduction 1.2 Classification of Signals
x(t) x[n]
I Continuous-Amplitude Signals: signal amplitude takes on a I Discrete-Amplitude Signals: signal amplitude takes
2 1 on values
spectrum of values within one or more intervals from a finite set n
-4 -3 -2 -1 1 2 3 4
t -3 -2 -1 0 1 2 3
-2 -2
x(t) x[n]
2 2
1 1 1
t n
0.5
-2
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 7 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 8 / 51
Chapter 1: Introduction 1.2 Classification of Signals Chapter 1: Introduction 1.2 Classification of Signals
-3 -2 -1 1 2 3 4
t 0.5
t
-4
-2
-4 -3 -2 -1
-2
0.5 1 1.5 2 2.5 3 4
I Digital signals are important because they facilitate the use of
digital signal processing (DSP) systems, which have practical
x[n] x[n] and performance advantages for several applications.
discrete-time 2
1
1 1
-3 -2 -1 0 1 2 3
n -3 -2 -1 0 1 2 3
n
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 9 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 10 / 51
Chapter 1: Introduction 1.2 Classification of Signals Chapter 1: Introduction 1.2 Classification of Signals
I Deterministic signal:
I analog system = I any signal that can be uniquely described by an explicit
analog signal input + analog signal output mathematical expression, a table of data, or a well-defined rule
I advantages: easy to interface to real world, do not need A/D or I past, present and future values of the signal are known precisely
D/A converters, speed not dependent on clock rate without any uncertainty
I Random signal:
I digital system = I any signal that lacks a unique and explicit mathematical
digital signal input + digital signal output
expression and thus evolves in time in an unpredictable manner
I advantages: re-configurability using software, greater control I it may not be possible to accurately describe the signal
over accuracy/resolution, predictable and reproducible behavior I the deterministic model of the signal may be too complicated to
be of use.
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 11 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 12 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 13 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 14 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 15 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 16 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
I discrete-time signal (not digital), ∵ −A ≤ xa (t) ≤ A and n ∈ Z 1. x(n) is periodic only if its frequency f is a rational number
I A = amplitude I Note: rational number is of the form kk21 for k1 , k2 ∈ Z
I periodic discrete-time sinusoids: √
I ω = frequency in rad/sample
x(n) = 2 cos( 47 πn), x(n) = sin(− π5 n + 3)
I f = frequency in cycles/sample; note: ω = 2πf I aperiodic discrete-time sinusoids:
√ √
I θ = phase in rad x(n) = 2 cos( 47 n), x(n) = sin( 2πn + 3)
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 17 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 18 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
Discrete-time Sinusoids
MINIMUM OSCILLATION
x(n) = A cos(ωn + θ) = A cos(2πfn + θ), n ∈ Z
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 19 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 20 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
√
where j , −1
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 21 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 22 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 23 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 24 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
1
Example 1: ω = π/6 = π · 6
πn
x[n] = cos
6
2πk 2πk
N = = 1 = 12k
Ω π6
N0 = 12 for k = 1
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 25 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 26 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
8
Example 2: ω = 8π/31 = π · 31
8πn
x[n] = cos
31
2πk 2πk 31
N = = 8 = k
Ω π 31 4
N0 = 31 for k = 4
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 27 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 28 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
1
Example 3: ω = 1/6 = π · 6π
n
x[n] = cos
6
NOT PERIODIC
2πk 2πk
N = = 1 = 12πk
Ω 6
N ∈ Z+ does not exist for any k ∈ Z; x[n] is non-periodic.
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 29 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 30 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
Let f1 = f0 + k where k ∈ Z,
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 31 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 32 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
-2 2 6 -2 2 6
-3 -1 0 1 3 4 5 -3 -1 0 1 3 4 5
-2 2 6 -2 2 6
-3 -1 0 1 3 4 5 -3 -1 0 1 3 4 5
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 33 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 34 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
x1 (n) = A e j(2πf1 n+θ) = A e j(2πf0 n+θ) = x0 (n). Scientific Designation Frequency (Hz) k for F0 = 8.176
C-1 8.176 1
C0 16.352 2
C1 32.703 4
I Example: A dst-time sinusoid with frequency f1 = 4.56 is the C2 65.406 8
same as a dst-time sinusoid with frequency f0 = 4.56 − 4 = 0.56. C3 130.813 16
I Example: A dst-time sinusoid with frequency f1 = − 78 is the C4 261.626 32
same as a dst-time sinusoid with frequency f0 = − 78 + 1 = 18 . .. ..
. .
C9 8372.018 1024
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 35 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 36 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 37 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 38 / 51
Chapter 1: Introduction 1.3 The Concept of Frequency Chapter 1: Introduction 1.3 The Concept of Frequency
Discrete-time Case:
1
For periodicity, select f0 = N
where N ∈ Z: sk+N (n) = e j2π(k+N)n/N
= e j2πkn/N · e j2πNn/N
Harmonically related sk (n) = e j2πkf0 n = e j2πkn/N ,
(dts-time) k = 0, ±1, ±2, . . . = e j2πkn/N · 1
= e j2πkn/N = sk (n)
I There are only N distinct dst-time harmonics: Therefore, there are only N distinct dst-time harmonics:
sk (n), k = 0, 1, 2, . . . , N − 1. sk (n), k = 0, 1, 2, . . . , N − 1.
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 39 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 40 / 51
Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion
Sampling:
I conversion from cts-time to dst-time by taking “samples” at
discrete time instants
I E.g., uniform sampling: x(n) = xa (nT ) where T is the sampling
period and n ∈ Z
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 41 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 42 / 51
Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion
Quantization: Coding:
I conversion from dst-time cts-valued signal to a dst-time I representation of each dst-value xq (n) by a
dst-valued signal b-bit binary sequence
I quantization error: eq (n) = xq (n) − x(n) for all n ∈ Z I e.g., if for any n, xq (n) ∈ {0, 1, . . . , 6, 7}, then the coder may
use the following mapping to code the quantized amplitude:
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 43 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 44 / 51
Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion
Fs > 2Fmax = 2B
Analog Discrete-time Quantized Digital
signal signal signal signal then xa (t) can be exactly recovered from its sample values using the
interpolation function
Example coder:
sin(2πBt)
0 000 4 100 g (t) =
2πBt
1 001 5 101
2 010 6 110 Note: FN = 2B = 2Fmax is called the Nyquist rate.
3 011 7 111
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 45 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 46 / 51
Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion
Therefore, given the interpolation relation, xa (t) can be written as x(n) samples
bandlimited interpolation
∞
X function -- sinc
xa (t) = xa (nT )g (t − nT )
n=−∞
0
n
∞
X
xa (t) = x(n) g (t − nT )
n=−∞
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 47 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 48 / 51
Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion Chapter 1: Introduction 1.4 Analog-to-Digital and Digital-to-Analog Conversion
0
n -3T -2T -T 0 T 2T 3T
t
zero-order
hold
I Common interpolation approaches: bandlimited interpolation, I Common interpolation approaches: bandlimited interpolation,
zero-order hold, linear interpolation, higher-order interpolation zero-order hold, linear interpolation, higher-order interpolation
techniques, e.g., using splines techniques, e.g., using splines
I In practice, “cheap” interpolation along with a smoothing filter I In practice, “cheap” interpolation along with a smoothing filter
is employed. is employed.
Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 49 / 51 Professor Deepa Kundur (University of Toronto)Introduction to Digital Signal Processing 50 / 51
Digital-to-Analog Conversion
original/bandlimited
interpolated signal 1 linear
interpolation
-3T -2T -T 0 T 2T 3T
t