digital signal processing, mm1, version 0.6

23
1 Digital Signal Processing, I, Zheng-Hua Tan, 2006 1 Digital Signal Processing, Fall 2006 Zheng-Hua Tan Department of Electronic Systems Aalborg University, Denmark [email protected] Lecture 1: Introduction, Discrete-time signals and systems Digital Signal Processing, I, Zheng-Hua Tan, 2006 2 Part I: Introduction Introduction (Course overview) Discrete-time signals Discrete-time systems Linear time-invariant systems

Upload: diacman

Post on 21-Sep-2014

79 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Digital Signal Processing, MM1, Version 0.6

1

Digital Signal Processing, I, Zheng-Hua Tan, 20061

Digital Signal Processing, Fall 2006

Zheng-Hua Tan

Department of Electronic Systems Aalborg University, Denmark

[email protected]

Lecture 1: Introduction,

Discrete-time signals and systems

Digital Signal Processing, I, Zheng-Hua Tan, 20062

Part I: Introduction

Introduction (Course overview)Discrete-time signals Discrete-time systemsLinear time-invariant systems

Page 2: Digital Signal Processing, MM1, Version 0.6

2

Digital Signal Processing, I, Zheng-Hua Tan, 20063

General information

Course websitehttp://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.

Digital Signal Processing, I, Zheng-Hua Tan, 20064

General information

Duration2 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 TanNiels Jernes Vej 12, [email protected], +45 9635-8686

Page 3: Digital Signal Processing, MM1, Version 0.6

3

Digital Signal Processing, I, Zheng-Hua Tan, 20065

Course at a glance

Discrete-time signals and systems

Fourier-domain representation

DFT/FFT

Systemstructures

Filter structures Filter design

Filter

z-transform

MM1

MM2

MM9,MM10MM3

MM6

MM4

MM7 MM8

Sampling andreconstruction MM5

Systemanalysis

System

Digital Signal Processing, I, Zheng-Hua Tan, 20066

Course objectives (Part I)

To give the students a comprehension of the concepts of discrete-time signals and systemsTo give the students a comprehension of the Z- and the Fourier transform and their inverseTo give the students a comprehension of the relation between digital filters, difference equations and system functionsTo give the students knowledge about the most important issues in sampling and reconstruction

Page 4: Digital Signal Processing, MM1, Version 0.6

4

Digital Signal Processing, I, Zheng-Hua Tan, 20067

Course objectives (Part II)

To make the students able to apply digital filters according to known filter specificationsTo provide the knowledge about the principles behind the discrete Fourier transform (DFT) and its fast computationTo make the students able to apply Fourier analysis of stochastic signals using the DFTTo be able to apply the MATLAB program to digital processing problems and presentations

Digital Signal Processing, I, Zheng-Hua Tan, 20068

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.

Page 5: Digital Signal Processing, MM1, Version 0.6

5

Digital Signal Processing, I, Zheng-Hua Tan, 20069

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)} .

Digital Signal Processing, I, Zheng-Hua Tan, 200610

Types of signals

The independent variable may be either continuous or discrete

Continuous-time signalsDiscrete-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 continuousDigital signals: both are discrete

Computers and other digital devices are restricted to discrete time Signal processing systems classification follows the same lines

Page 6: Digital Signal Processing, MM1, Version 0.6

6

Digital Signal Processing, I, Zheng-Hua Tan, 200611

Types of signals

From http://www.ece.rochester.edu/courses/ECE446

Digital Signal Processing, I, Zheng-Hua Tan, 200612

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

Page 7: Digital Signal Processing, MM1, Version 0.6

7

Digital Signal Processing, I, Zheng-Hua Tan, 200613

Typical DSP system components

Input lowpass filter to avoid aliasingAnalog to digital converter (ADC)Computer or DSP processorDigital to analog converter (DAC)Output lowpass filter to avoid imaging

Digital Signal Processing, I, Zheng-Hua Tan, 200614

ADC and DAC

Physical signals Analog signals Digital signals

Transducerse.g. microphones

Analog-to-digitalconverters

Digital-to-Analogconverters

Output devices

Page 8: Digital Signal Processing, MM1, Version 0.6

8

Digital Signal Processing, I, Zheng-Hua Tan, 200615

Pros and cons of DSP

ProsEasy to duplicateStable and robust: not varying with temperature, storage without deteriorationFlexibility and upgrade: use a general computer or microprocessor

ConsLimitations of ADC and DACHigh power consumption and complexity of a DSP implementation: unsuitable for simple, low-power applicationsLimited to signals with relatively low bandwidths

Digital Signal Processing, I, Zheng-Hua Tan, 200616

Applications of DSP

Speech processingEnhancement – noise filteringCoding Text-to-speech (synthesis)

Next generation TTS @ AT&TRecognition

Image processingEnhancement, coding, pattern recognition (e.g. OCR)

Multimedia processingMedia transmission, digital TV, video conferencing

CommunicationsBiomedical engineeringNavigation, radar, GPS Control, robotics, machine vision

Page 9: Digital Signal Processing, MM1, Version 0.6

9

Digital Signal Processing, I, Zheng-Hua Tan, 200617

History of DSP

Prior to 1950’s: analog signal processing using electronic circuits or mechanical devices1950’s: computer simulation before analog implementation, thus cheap to try out1965: Fast Fourier Transforms (FFTs) by Cooley and Tukey – make real time DSP possible1980’s: IC technology boosting DSP

Digital Signal Processing, I, Zheng-Hua Tan, 200618

Part II: Discrete-time signals

IntroductionDiscrete-time signalsDiscrete-time systemsLinear time-invariant systems

Page 10: Digital Signal Processing, MM1, Version 0.6

10

Digital Signal Processing, I, Zheng-Hua Tan, 200619

Discrete-time signals

Sequences of numbers

Periodic sampling of an analog signal

integeran is where]},[{

nnnxx ∞<<∞−=

period. sampling thecalled is where),(][

TnnTxnx a ∞<<∞−=

x[1]

x[2]

x[n]x[-1]

x[0]

Digital Signal Processing, I, Zheng-Hua Tan, 200620

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]

αα

integeran is where][][ 0

nnnxny −=

Page 11: Digital Signal Processing, MM1, Version 0.6

11

Digital Signal Processing, I, Zheng-Hua Tan, 200621

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[][ 523 −+++++= −− nanananx δδδ

∑∞

−∞=

−=k

knkxnx ][][][ δ

⎩⎨⎧

=≠

=,0,1,0,0

][nn

Digital Signal Processing, I, Zheng-Hua Tan, 200622

Defined as

Related to the impulse by

Conversely,

Unit step sequence

⎩⎨⎧

<≥

=,0,0,0,1

][nn

nu

∑∑∞

=

−∞=

−=−=

+−+−+=

0

][][][][

or...]2[]1[][][

kk

knknkunu

nnnnu

δδ

δδδ

]1[][][ −−= nununδ

Page 12: Digital Signal Processing, MM1, Version 0.6

12

Digital Signal Processing, I, Zheng-Hua Tan, 200623

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.

10 << α

1|| >α

α

nAnx α=][

01 <<− α

n

n

n

nxnxnx

22][)5.0(2][

)5.0(2][

⋅=

−⋅=

⋅=

Digital Signal Processing, I, Zheng-Hua Tan, 200624

Combining basic sequences

An exponential sequence that is zero for n<0

⎩⎨⎧

<≥

=0 ,0,0,

][nnA

nxnα

][][ nuAnx nα=

Page 13: Digital Signal Processing, MM1, Version 0.6

13

Digital Signal Processing, I, Zheng-Hua Tan, 200625

Sinusoidal sequences

with A and real constants.The with complex has real and imaginary parts that are exponentially weighted sinusoids.

φnAα

)sin(||||)cos(||||

||||

||||][

then,|| and || If

00

)( 0

0

0

φωαφωα

α

αα

αα

φω

ωφ

φω

+++=

=

==

==

+

nAjnA

eA

eeAAnx

eAAe

nn

njn

njnjn

jj

α

nnAnx allfor ),cos(][ 0 φω +=

Digital Signal Processing, I, Zheng-Hua Tan, 200626

Complex exponential sequence

By analogy with the continuous-time case, the quantity is called the frequency of the complex sinusoid or complex exponential and is call the phase.n is always an integer differences between discrete-time and continuous-time

φ0ω

)sin(||)cos(||||][

,1||When

00)( 0 φωφω

αφω +++==

=+ nAjnAeAnx nj

Page 14: Digital Signal Processing, MM1, Version 0.6

14

Digital Signal Processing, I, Zheng-Hua Tan, 200627

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

njnjnjnj AeeAeAenx 000 2)2(][ ωπωπω === +

)2( 0 πω +

πωπωπ 20or 00 <≤≤<−

rr ,)2( 0 πω +

)cos(])2cos[(][ 00 φωφπω +=++= nAnrAnxπ2

njrnjnjnrj AeeAeAenx 000 2)2(][ ωπωπω === +

Digital Signal Processing, I, Zheng-Hua Tan, 200628

Another 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/2or 2 that requireswhich

)cos()cos(

00

000

kkNkN

NnAnAωππω

φωωφω==

++=+

nNnxnx allfor ,][][ +=

Page 15: Digital Signal Processing, MM1, Version 0.6

15

Digital Signal Processing, I, Zheng-Hua Tan, 200629

Another important difference – periodicity

Same for complex exponential sequence

So, complex exponential and sinusoidal sequences are not necessarily periodic in n with period and, depending on the value of , may not be periodic at all.

Consider

kNee njNnj

πω

ωω

2for only trueiswhich ,

0

)( 00

==+

)/2( 0ωπ0ω

16 of period ath wi),8/3cos(][ 8 of period ath wi),4/cos(][

2

1

====

NnnxNnnx

ππ

Increasing frequency increasing period!

Digital Signal Processing, I, Zheng-Hua Tan, 200630

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

txtAtx

Ω+Ω= φ

slower. become nsoscillatio the,2 towards from increases asrapidly more and more oscillates ][ , towards0 from increases as

),cos(][

0

0

0

ππωπω

φωnx

nAnx +=

Page 16: Digital Signal Processing, MM1, Version 0.6

16

Digital Signal Processing, I, Zheng-Hua Tan, 200631

Frequency

Digital Signal Processing, I, Zheng-Hua Tan, 200632

Part II: Discrete-time systems

Introduction Discrete-time signals Discrete-time systemsLinear time-invariant systems

Page 17: Digital Signal Processing, MM1, Version 0.6

17

Digital Signal Processing, I, Zheng-Hua Tan, 200633

Discrete-time systems

A transformation or operator that maps input into output

Examples:The ideal delay system

A memoryless system

]}[{][ nxTny =

T{.}x[n] y[n]

∞<<∞−−= nnnxny d ],[][

∞<<∞−= nnxny ,])[(][ 2

Digital Signal Processing, I, Zheng-Hua Tan, 200634

Linear systems

A system is linear if and only if

Combined into superposition

Example 2.6, 2.7 pp. 19

constantarbitrary an is where][]}[{]}[{

and][][]}[{]}[{]}[][{ 212121

anaynxaTnaxT

nynynxTnxTnxnxT

==

+=+=+additivity property

scaling property

][][]}[{]}[{]}[][{ 212121 naynaynxaTnxaTnbxnaxT +=+=+

Page 18: Digital Signal Processing, MM1, Version 0.6

18

Digital Signal Processing, I, Zheng-Hua Tan, 200635

Time-invariant systems

For which a time shift or delay of the input sequencecauses a corresponding shift in the output sequence.

Example 2.8 pp. 20

][][][][ 0101 nnynynnxnx −=⇒−=

Digital Signal Processing, I, Zheng-Hua Tan, 200636

Causality

The output sequence value at the index n=n0depends only on the input sequence values for n<=n0.

Example

Causal for nd>=0Noncausal for nd<0

∞<<∞−−= nnnxny d ],[][

Page 19: Digital Signal Processing, MM1, Version 0.6

19

Digital Signal Processing, I, Zheng-Hua Tan, 200637

Stability

A system is stable in the BIBO sense if and only ifevery bounded input sequence produces a bounded output sequence.

Example

stable∞<<∞−= nnxny ,])[(][ 2

Digital Signal Processing, I, Zheng-Hua Tan, 200638

Part III: Linear time-invariant systems

Course overviewDiscrete-time signals Discrete-time systemsLinear time-invariant systems

Page 20: Digital Signal Processing, MM1, Version 0.6

20

Digital Signal Processing, I, Zheng-Hua Tan, 200639

Linear time-invariant systems

Important due to convenient representations and significant applicationsA linear system is completely characterised by itsimpulse response

Time invariance

][*][

][][][

nhnx

knhkxnyk

=

−= ∑∞

−∞=

∑∑

∑∞

−∞=

−∞=

−∞=

=−=

−==

kk

k

k

nhkxknTkx

knkxTnxTny

][][}][{][

}][][{]}[{][

δ

δ

][][ knhnhk −=

Convolution sum

Digital Signal Processing, I, Zheng-Hua Tan, 200640

Forming the sequence h[n-k]

Page 21: Digital Signal Processing, MM1, Version 0.6

21

Digital Signal Processing, I, Zheng-Hua Tan, 200641

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

knhkxnhnxny ][][][*][][

∞<<−∞ k

Digital Signal Processing, I, Zheng-Hua Tan, 200642

Computing a discrete convolution

Example 2.13 pp.26Impulse response

input

⎪⎪⎪

⎪⎪⎪

<−−−

−≤≤−−

<

=

+−

+

.1 ),1

1(

,10 ,1

1,0 ,0

][

1

1

nNa

aa

Nna

an

nyN

Nn

n

][][ nuanx n=

⎩⎨⎧ −≤≤

=

−−=

otherwise. ,0,10 ,1][][][

NnNnununh

Page 22: Digital Signal Processing, MM1, Version 0.6

22

Digital Signal Processing, I, Zheng-Hua Tan, 200643

Properties of LTI systems

Defined by discrete-time convolutionCommutative

Linear

Cascade connection (Fig. 2.11 pp.29)

Parallel connection (Fig. 2.12 pp.30)

][*][][*][ nxnhnhnx =

][][][ 21 nhnhnh +=

][*][][ 21 nhnhnh =

][*][][*][])[][(*][ 2121 nhnxnhnxnhnhnx +=+

Digital Signal Processing, I, Zheng-Hua Tan, 200644

Properties of LTI systems

Defined by the impulse responseStable

Causality

∑∞

−∞=

∞<=k

khS |][|

0 ,0][ <= nnh

Page 23: Digital Signal Processing, MM1, Version 0.6

23

Digital Signal Processing, I, Zheng-Hua Tan, 200645

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)

Digital Signal Processing, I, Zheng-Hua Tan, 200646

Summary

Course overviewDiscrete-time signals Discrete-time systemsLinear time-invariant systems

Matlab functions for the exercises in this lecture are available athttp://kom.aau.dk/~zt/cources/DSP_E/MM1/Thanks Borge Lindberg for providing the functions.