Download as pdf or txt
Download as pdf or txt
You are on page 1of 39

HO CHI MINH CITY UNIVERSITY OF SCIENCE

FACULTY OF ELECTRONICS AND TELECOMMUNICATIONS


DEPARTMENT OF TELECOMMUNICATIONS AND NETWORKS

Course

DIGITAL SIGNAL PROCESSING

Chapter
INTRODUCTION TO DIGITAL
1 SIGNAL PROCESSING

Lecturer: Tran Thi Thao Nguyen, Ph.D. Email: tttnguyen@hcmus.edu.vn


Outline
1. Course overview
2. Digital Signal Processing
3. Basic operations & block diagrams
4. Classes of sequences

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 2
1. Course overview
Digital signal processing:
Modifying signals with computers
Book:
Mitra “Digital Signal Processing” (3rd ed., 2005)

Lecturer:
Tran Thi Thao Nguyen, Ph.D.
Contact:
Email: tttnguyen@hcmus.edu.vn
Microsoft Teams

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 3
Grading structure
Class assignments: 20 points

Group project: 20 points

Final examination: 50 points

Class Activities: 10 points


Questions for Lecture
Attendance >= 8 days

Total = 100 points

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 4
Course project

Course project
Work in Group (5-6 members/group)
oTheory
 Choose a theory topic from the lecturer or
yourself selected
oPractice
 Goal: hands-on experience with DSP
 Any ideas/topics are good
 Practical implementation
 Recommend MATLAB
Submit report and presentation

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 5
Schedule
 45 periods.

 4-5 periods / day.

 Totally in 10 days:
 9 days for lecture
 1 day for Group presentation

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 6
Course content

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 7
2. Digital Signal Processing

Signals: Information-bearing function

E.g. sound: air pressure variation at a point as a


function of time p(t)

Dimensionality:
Sound: 1-Dimension
Greyscale image i(x,y): 2-D
Video: 3 x 3-D: {r(x,y,t) g(x,y,t) b(x,y,t)}
1

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 8
Example signals

Noise - all domains


Spread-spectrum phone - radio
ECG - biological
Music
Image/video - compression
….

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 9
Signal processing

Modify a signal to extract/enhance/rearrange the


information

Origin in analog electronics e.g. radar

Examples
Noise reduction
Data compression
Representation for recognition/classification

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 10
Digital Signal Processing

DSP = signal processing on a computer


Two effects: discrete-time, discrete level

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 11
DSP vs. analog SP

Conventional signal processing:

Digital SP system:

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 12
Digital vs. analog

Pros
Noise performance - quantized signal
Use a general computer - flexibility, upgrade
Stability/duplicability
Novelty

Cons
Limitations of A/D & D/A
Baseline complexity / power consumption

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 13
DSP example

Speech time-scale modification: extend duration


without altering pitch

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 14
3. Operations on signals

Discrete time signal often obtained by sampling a


continuous-time signal

Sequence {x[n]} = xa(nT), n=…-1,0,1,2…


T= samp. period; 1/T= samp. frequency

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 15
Sequences

Can write a sequence by listing values:

Arrow indicates where n=0

Thus,

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 16
Left- and right-sided

x[n] may be defined only for certain n:


N1 ≤ n ≤ N2: Finite length (length = …)
N1 ≤ n: Right-sided (Causal if N1 ≥ 0)
n ≤ N2: Left-sided (Anticausal)

Can always extend with zero-padding

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 17
Operations on sequences

Addition operation:
Adder

Multiplication operation
Multiplier

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 18
More operations

Product (modulation) operation:


Modulator

E.g. Windowing:
Multiplying an infinite-length sequence by a finite-
length window sequence to extract a region

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 19
Time shifting

Time-shifting operation:
where N is an integer

If N > 0, it is delaying operation


Unit delay

If N < 0, it is an advance operation


Unit advance

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 20
Combination of basic operations

Example

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 21
Up- and down-sampling

Certain operations change the effective sampling rate


of sequences by adding or removing samples

Up-sampling = adding more samples = interpolation

Down-sampling = discarding samples = decimation

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 22
Down-sampling

In down-sampling by an integer factor M > 1,


every M-th sample of the input sequence is kept and
M - 1 in-between samples are removed:

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 23
Down-sampling
An example of down-sampling

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 24
Up-sampling

Up-sampling is the converse of downsampling: L-1


zero values are inserted between each pair of original
values.

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 25
Up-sampling
An example of up-sampling

3
Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 26
Complex numbers

 A mathematical convenience that lead to simple


expressions
 A second “imaginary” dimension (j≡√-1) is added to
all values.
Rectangular form: x = xre + j·xim
where magnitude |x| = √(xre2 + xim2)
and phase θ = tan-1(xim/xre)
Polar form: x = |x| ejθ = |x|cosθ + j· |x|sinθ
(ejθ= cosθ + j sinθ)

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 27
Complex math

When adding, real and


imaginary parts add:
(a+jb) + (c+jd) =
(a+c) + j(b+d)

When multiplying,
magnitudes multiply
and phases add:
rejθ·sejφ = rsej(θ+φ)

Phases modulo 2π

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 28
Complex conjugate

Flips imaginary part / negates phase:


Conjugate x* = xre – j·xim = |x| ej(–θ)
Useful in resolving to real quantities:
x + x* = xre + j·xim + xre – j·xim = 2xre
x·x* = |x| ej(θ) |x| ej(–θ) = |x|2

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 29
Classes of sequences

Useful to define broad categories

Finite/infinite (extent in n)

Real/complex:
x[n] = xre[n] + j·xim[n]

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 30
Classification by symmetry

Conjugate symmetric sequence:


if x[n] = xre[n] + j·xim[n]
then xcs[n] = xcs*[-n]
= xre[-n] – j·xim[-n]

Conjugate antisymmetric:
xca[n] = –xca*[-n] = –xre[-n] + j·xim[-n]
Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 31
Conjugate symmetric decomposition
Any sequence can be expressed as conjugate symmetric
(CS) / antisymmetric (CA) parts:
x[n] = xcs[n] + xca[n]
where:
xcs[n] = 1/2(x[n] + x*[-n]) = xcs*[-n]
xca[n] = 1/2(x[n] – x*[-n]) = -xca*[-n]

When signals are real,


CS → Even (xre[n] = xre[-n]), CA → Odd

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 32
Basic sequences

 Unit sample sequence:

 Shift in time:

Can express any sequence with :

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 33
More basic sequences

Unit step sequence:

Relate to unit sample:

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 34
Exponential sequences

Exponential sequences are eigenfunctions of LTI


systems
General form: x[n] = A·an
If A and a are real (and positive):

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 35
Complex exponentials

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 36
Complex exponentials

Complex exponential sequence can ‘project down’


onto real & imaginary axes to give sinusoidal
sequences

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 37
Periodic sequences

Lecturer: Tran Thi Thao Nguyen, Ph.D. - Department of Telecommunications and Networks, FETEL, HCMUS 38
QA

Lecturer: Tran Thi Thao Nguyen, Ph.D.


Ho Chi Minh City University of Science
Faculty of Electronics - Communications
Department of Telecommunication - Networks
Email: tttnguyen@hcmus.edu.vn

You might also like