Digital Signal Processing, I, Zheng-Hua Tan, 2006 1
Digital Signal Processing, Fall 2006
Zheng-Hua Tan
Department of Electronic Systems Aalborg University, Denmark
Lecture 1: Introduction,
Discrete-time signals and systems
Part I: Introduction
Introduction (Course overview)
Discrete-time signals
Discrete-time systems
Linear time-invariant systems
Digital Signal Processing, I, Zheng-Hua Tan, 2006 3
General information
Course website
http://kom.aau.dk/~zt/cources/DSP/
Textbook:
Oppenheim, A.V., Schafer, R.W, "Discrete-Time Signal Processing", 2nd Edition, Prentice-Hall, 1999.
Readings:
Steven W. Smith, “The Scientist and Engineer's Guide to Digital Signal Processing”, California Technical Publishing, 1997. http://www.dspguide.com/pdfbook.htm (You can download the entire book!)
Kermit Sigmon, "Matlab Primer", Third Edition, Department of Mathematics, University of Florida.
V.K. Ingle and J.G. Proakis, "Digital Signal Processing using MATLAB", Bookware Companion Series, 2000.
General information
Duration
2 ECTS (10 Lectures)
Prerequisites:
Background in advanced calculus including complex variables, Laplace- and Fourier transforms.
Course type:
Study programme course (SE-course) , meaning a written exam at the end of the semester!
Lecturer:
Associate Professor, PhD, Zheng-Hua Tan Niels Jernes Vej 12, A6-319
[email protected], +45 9635-8686
Digital Signal Processing, I, Zheng-Hua Tan, 2006 5
Course at a glance
Discrete-time signals and systems
Fourier-domain representation
DFT/FFT
System structures
Filter structures Filter design Filter
z-transform MM1
MM2
MM9,MM10 MM3
MM6
MM4
MM7 MM8
Sampling and
reconstruction MM5
System analysis System
Course objectives (Part I)
To give the students a comprehension of the concepts of discrete-time signals and
systems
To give the students a comprehension of the Z- and the Fourier transform and their inverse
To give the students a comprehension of the relation between digital filters, difference equations and system functions
To give the students knowledge about the
most important issues in sampling and
reconstruction
Digital Signal Processing, I, Zheng-Hua Tan, 2006 7
Course objectives (Part II)
To make the students able to apply digital filters according to known filter specifications
To provide the knowledge about the principles behind the discrete Fourier transform (DFT) and its fast computation
To make the students able to apply Fourier analysis of stochastic signals using the DFT
To be able to apply the MATLAB program to digital processing problems and
presentations
What is a signal ?
A flow of information.
(mathematically represented as) a function of independent variables such as time (e.g.
speech signal), position (e.g. image), etc.
A common convention is to refer to the
independent variable as time, although may
in fact not.
Digital Signal Processing, I, Zheng-Hua Tan, 2006 9
Example signals
Speech: 1-Dimension signal as a function of time s(t);.
Grey-scale image: 2-Dimension signal as a function of space i(x,y)
Video: 3 x 3-Dimension signal as a function of space and time {r(x,y,t), g(x,y,t), b(x,y,t)} .
Types of signals
The independent variable may be either continuous or discrete
Continuous-time signals
Discrete-time signals are defined at discrete times and represented as sequences of numbers
The signal amplitude may be either continuous or discrete
Analog signals: both time and amplitude are continuous
Digital signals: both are discrete
Computers and other digital devices are restricted to discrete time
Signal processing systems classification follows the same lines
Digital Signal Processing, I, Zheng-Hua Tan, 2006 11
Types of signals
From http://www.ece.rochester.edu/courses/ECE446
Digital signal processing
Modifying and analyzing information with computers – so being measured as
sequences of numbers.
Representation, transformation and
manipulation of signals and information they
contain
Digital Signal Processing, I, Zheng-Hua Tan, 2006 13
Typical DSP system components
Input lowpass filter to avoid aliasing
Analog to digital converter (ADC)
Computer or DSP processor
Digital to analog converter (DAC)
Output lowpass filter to avoid imaging
ADC and DAC
Physical signals Analog signals Digital signals Transducers
e.g. microphones
Analog-to-digital converters
Digital-to-Analog converters Output devices
Digital Signal Processing, I, Zheng-Hua Tan, 2006 15
Pros and cons of DSP
Pros
Easy to duplicate
Stable and robust: not varying with temperature, storage without deterioration
Flexibility and upgrade: use a general computer or microprocessor
Cons
Limitations of ADC and DAC
High power consumption and complexity of a DSP implementation: unsuitable for simple, low-power applications
Limited to signals with relatively low bandwidths
Applications of DSP
Speech processing
Enhancement – noise filtering
Coding
Text-to-speech (synthesis)
Next generation TTS @ AT&T
Recognition
Image processing
Enhancement, coding, pattern recognition (e.g. OCR)
Multimedia processing
Media transmission, digital TV, video conferencing
Communications
Biomedical engineering
Navigation, radar, GPS
Control, robotics, machine vision
Digital Signal Processing, I, Zheng-Hua Tan, 2006 17
History of DSP
Prior to 1950’s: analog signal processing using electronic circuits or mechanical devices
1950’s: computer simulation before analog implementation, thus cheap to try out
1965: Fast Fourier Transforms (FFTs) by Cooley and Tukey – make real time DSP possible
1980’s: IC technology boosting DSP
Part II: Discrete-time signals
Introduction
Discrete-time signals
Discrete-time systems
Linear time-invariant systems
Digital Signal Processing, I, Zheng-Hua Tan, 2006 19
Discrete-time signals
Sequences of numbers
Periodic sampling of an analog signal
integer an
is where
]}, [ {
n
n n
x
x= −∞< <∞
period.
sampling the
called is where
), ( ] [
T
n nT
x n
x = a −∞< <∞
x[1]
x[2]
x[n]
x[-1]
x[0]
Sequence operations
The product and sum of two sequences x[n] and y[n]: sample-by-sample production and sum, respectively.
Multiplication of a sequence x[n] by a number : multiplication of each sample value by .
Delay or shift of a sequence x[n]
α α
integer an
is where
] [
]
[ 0
n n n x n
y = −
Digital Signal Processing, I, Zheng-Hua Tan, 2006 21
Basic sequences
Unit sample sequence(discrete-time impulse, impulse)
Any sequence can be represented as a sum of scaled, delayed impulses
More generally
] 5 [ ...
] 3 [ ]
3 [ ]
[n =a−3 n+ +a−2 n+ + +a5 n−
x δ δ δ
∑
∞−∞
=
−
=
k
k n k x n
x[ ] [ ]δ[ ]
⎩⎨
⎧
=
= ≠
, 0 ,
1
, 0 ,
] 0
[ n
n n δ
Defined as
Related to the impulse by
Conversely,
Unit step sequence
⎩⎨
⎧
<
= ≥
, 0 ,
0
, 0 ,
] 1
[ n
n n u
∑
∑
∞=
∞
−∞
=
−
=
−
=
+
− +
− +
=
0
] [ ] [ ] [ ] [ or
...
] 2 [ ] 1 [ ] [ ] [
k k
k n k
n k u n u
n n
n n u
δ δ
δ δ
δ
] 1 [ ] [ ]
[n =u n −u n− δ
Digital Signal Processing, I, Zheng-Hua Tan, 2006 23
Exponential sequences
Extremely important in representing and analyzing LTI systems.
Defined as
If A and are real numbers, the sequence is real.
If and A is positive, the sequence values are positive and decrease with increasing n.
If , the sequence values alternate in sign, but again decrease in magnitude with increasing n.
If , the sequence values increase with increasing n.
1 0<α <
1
|
| α
>α
A
nn
x [ ] = α
0 1< <
− α
n n n
n x
n x
n x
2 2 ] [
) 5 . 0 ( 2 ] [
) 5 . 0 ( 2 ] [
⋅
=
−
⋅
=
⋅
=
Combining basic sequences
An exponential sequence that is zero for n<0
⎩⎨
⎧
<
= ≥
0
, 0
, 0 ] ,
[
nn n A
x
α
n] [ ]
[
n A u nx =
α
nDigital Signal Processing, I, Zheng-Hua Tan, 2006 25
Sinusoidal sequences
with A and real constants.
The with complex has real and imaginary parts that are exponentially weighted sinusoids.
φ
Aαn
) sin(
|
||
| ) cos(
|
||
|
|
||
|
|
|
|
| ]
[
then ,
|
| and
|
| If
0 0
) ( 0
0 0
φ ω α
φ ω α
α α α
α α
φ ω φ ω
φ ω
+ +
+
=
=
=
=
=
=
+
n A
j n
A
e A
e e
A A
n x
e A A e
n n
n j n
n n j j
n
j j
α
n n
A n
x
[ ]
=cos( ω
0 +φ ), for all
Complex exponential sequence
By analogy with the continuous-time case, the quantity is called the frequencyof the complex sinusoid or complex exponential and is call the phase.
nis always an integer Ædifferences between discrete-time and continuous-time
φ
ω
0) sin(
|
| ) cos(
|
|
|
| ] [
, 1
|
| When
0 0
)
( 0 ω φ ω φ
α
φ
ω = + + +
=
=
+ A n j A n
e A n
x j n
Digital Signal Processing, I, Zheng-Hua Tan, 2006 27
An important difference – frequency range
Consider a frequency
More generally being an integer,
Same for sinusoidal sequences
So, only consider frequencies in an interval of such as
n j n
j n j n
j
Ae e Ae
Ae n
x [ ] =
(ω0+2π)=
ω0 2π=
ω0)
2 ( ω
0+ π
π ω
π ω
π <
0≤ or 0 ≤
0< 2
−
r r ) , 2 ( ω
0+ π
) cos(
] )
2 cos[(
]
[ n = A ω
0+ π r n + φ = A ω
0n + φ x
π 2
n rn j
n j j n
r
j Ae e Ae
Ae n
x
[ ]
= (ω0+2π ) = ω0 2π = ω0Another important difference – periodicity
In the continuous-time case, a sinusoidal signal and a complex exponential signal are both periodic.
In the discrete-time case, a periodic sequence is defined as
where the period N is necessarily an integer.
For sinusoid,
integer.
an is where
/ 2 or
2 that
requires which
) cos(
) cos(
0 0
0 0
0
k
k N
k N
N n
A n
A
ω π π
ω
φ ω
ω φ
ω
=
=
+ +
= +
n N
n x n
x [ ] = [ + ] , for all
Digital Signal Processing, I, Zheng-Hua Tan, 2006 29
Another important difference – periodicity
Same for complex exponential sequence
So, complex exponential and sinusoidal sequences
are not necessarily periodic in nwith period
and, depending on the value of , may not be periodic at all.
Consider
k N
e ej n N j n
π ω
ω ω
2 for
only true is which
,
0 )
( 0
0
=
+ =
) / 2 ( π ω0 ω0
16 of
period a
th wi ),
8 / 3 cos(
] [
8 of period a
th wi ),
4 / cos(
] [
2 1
=
=
=
=
N n
n x
N n
n x
π π
Increasing frequency Æincreasing period!
Another important difference – frequency
For a continuous-time sinusoidal signal
For the discrete-time sinusoidal signal
rapidly more
and more oscillates )
( increases, as
), cos(
) (
0
0
t x t A
t x
Ω
+ Ω
= φ
slower.
become ns
oscillatio the
, 2 towards from
increases as
rapidly more
and more oscillates ]
[ , towards 0
from increases as
), cos(
] [
0 0
0
π π
ω
π ω
φ ω
n x n
A n
x = +
Digital Signal Processing, I, Zheng-Hua Tan, 2006 31
Frequency
Part II: Discrete-time systems
Introduction
Discrete-time signals
Discrete-time systems
Linear time-invariant systems
Digital Signal Processing, I, Zheng-Hua Tan, 2006 33
Discrete-time systems
A transformation or operator that maps input into output
Examples:
The ideal delay system
A memoryless system
]}
[ { ]
[ n T x n y =
x[n] T{.} y[n]
∞
<
<
∞
−
−
= x n n n
n
y[ ] [ d],
∞
<
<
∞
−
= x n n
n
y[ ] ( [ ])2,
Linear systems
A system is linear if and only if
Combined into superposition
Example 2.6, 2.7 pp. 19 constant arbitrary
an is where
] [ ]}
[ { ]}
[ { and
] [ ] [ ]}
[ { ]}
[ { ]}
[ ] [
{ 1 2 1 2 1 2
a
n ay n
x aT n
ax T
n y n y n x T n x T n x n x T
=
=
+
= +
= +
additivity property
scaling property
] [ ] [ ]}
[ { ]}
[ { ]}
[ ] [
{ax1 n bx2 n aT x1 n aT x2 n ay1 n ay2 n
T + = + = +
Digital Signal Processing, I, Zheng-Hua Tan, 2006 35
Time-invariant systems
For which a time shift or delay of the input sequence causes a corresponding shift in the output sequence.
Example 2.8 pp. 20
] [ ] [ ] [ ]
[ 0 1 0
1 n x n n y n y n n
x = − ⇒ = −
Causality
The output sequence value at the indexn=n0 depends only on the input sequence values for n<=n0.
Example
Causal for nd>=0
Noncausal for nd<0
∞
<
<
∞
−
−
=x n n n
n
y[ ] [ d],
Digital Signal Processing, I, Zheng-Hua Tan, 2006 37
Stability
A system is stable in the BIBO sense if and only if every bounded input sequence produces a
bounded output sequence.
Example stable
∞
<
<
∞
−
= x n n
n
y
[ ] ( [ ])
2,
Part III: Linear time-invariant systems
Course overview
Discrete-time signals
Discrete-time systems
Linear time-invariant systems
Digital Signal Processing, I, Zheng-Hua Tan, 2006 39
Linear time-invariant systems
Important due to convenient representations and significant applications
A linearsystem is completely characterised by its impulse response
Time invariance
] [
* ] [
] [ ] [ ]
[
n h n x
k n h k x n
y
k
=
−
=
∑
∞−∞
=
∑
∑
∑
∞
−∞
=
∞
−∞
=
∞
−∞
=
=
−
=
−
=
=
k
k k
k
n h k x k
n T k x
k n k x T n x T n y
] [ ] [ }
] [ { ] [
} ] [ ] [ { ]}
[ { ] [
δ
δ
] [ ]
[n h n k hk = −
Convolution sum
Forming the sequence h[n-k]
Digital Signal Processing, I, Zheng-Hua Tan, 2006 41
Obtain the sequence h[n-k]
Reflecting h[k] about the origin to get h[-k]
Shifting the origin of the reflected sequence to k=n
Multiply x[k] and h[n-k] for
Sum the products to compute the output sample y[n]
Computation of the convolution sum
∑
∞−∞
=
−
=
=
k
k n h k x n
h n x n
y[ ] [ ]* [ ] [ ] [ ]
∞
<
<
−∞ k
Computing a discrete convolution
Example 2.13 pp.26 Impulse response
input
⎪⎪
⎪
⎩
⎪⎪
⎪
⎨
⎧
<
− −
−
−
≤
− ≤
− <
=
+
− +
. 1 1 ),
(
, 1 0
1 ,
1
, 0 , 0 ]
[
1 1
n a N
a
N a n
a
n n
y
N N
n n
] [ ]
[n a u n x = n
⎩⎨
⎧ ≤ ≤ −
=
−
−
=
otherwise.
, 0
, 1 0
, 1
] [ ] [ ] [
N n
N n u n u n h
Digital Signal Processing, I, Zheng-Hua Tan, 2006 43
Properties of LTI systems
Defined by discrete-time convolution
Commutative
Linear
Cascade connection (Fig. 2.11 pp.29)
Parallel connection (Fig. 2.12 pp.30) ] [
* ] [ ] [
* ]
[n hn h n x n
x =
] [ ] [ ]
[n h1 n h2 n
h = +
] [
* ] [ ]
[n h1 n h2 n
h =
] [
* ] [ ] [
* ] [ ]) [ ] [ (
* ]
[n h1 n h2 n x n h1 n x n h2 n
x + = +
Properties of LTI systems
Defined by the impulse response
Stable
Causality
∑
∞−∞
=
∞
<
=
k
k h S | [ ]|
0 , 0 ]
[n = n<
h
Digital Signal Processing, I, Zheng-Hua Tan, 2006 45
MATLAB
An interactive, matrix-based system for numeric computation and visualization
Kermit Sigmon, "Matlab Primer", Third Edition, Department of Mathematics, University of Florida.
Matlab Help (>> doc)
Summary
Course overview
Discrete-time signals
Discrete-time systems
Linear time-invariant systems
Matlab functions for the exercises in this lecture are available at
http://kom.aau.dk/~zt/cources/DSP_E/MM1/
Thanks Borge Lindberg for providing the