digital signal processingnwpu-dsp.com/lecture_notes/1-1 signals.pdf · 2020-01-06 ·...

59
Digital Signal Processing Prof. Dr. WAN Shuai School of Electronics and Information Northwestern Polytechnical University (International Class, 2019)

Upload: others

Post on 10-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

Digital Signal Processing

Prof. Dr. WAN Shuai

School of Electronics and Information

Northwestern Polytechnical University

(International Class, 2019)

Page 2: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Dr. WAN Shuai◼ B.E. in Telecommunication Engineering (2001) Xidian University◼ M.E. in Communication and Information System (2004) Xidian University◼ Ph.D. in Electronic Engineering (2007) Queen Mary, University of London

◼ Associate Professor & Supervisor for Master Students (2008)◼ Professor & Supervisor for Doctorial Candidates (2014)

Northwestern Polytechnical University◼ Adjunct Professor (2016) RMIT University, Australia

◼ Research interests: Video technologies◼ Email: [email protected]; Mobile: 13659188123

◼ Office: No. 349, Electronics & Information Building

Page 3: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

About this course◼ Provincial Elaborate Course (2012)

◼ Provincial Elaborate Source Sharing Course (2015)

◼ Brand English Teaching Course for Study in China, Ministry of Education of China (2016)

◼ EMI training program at Oxford University (2017)

◼ Internet Classroom (2018)

Page 4: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ Textbook:A. V. Oppenheim etc., Discrete-Time Signal Processing (third edition)Website: https://www.pearsonhigered.com/oppenheim

◼ Reference:

a) MIT Open Courseware of Digital Signal Processing:

https://ocw.mit.edu/resources/res-6-008-digital-signal-processing-spring-2011/introduction/

b) Tools for Digital Signal Processing in Matlab:

https://cn.mathworks.com/solutions/dsp/

c) Digital Signal Processing MOOC on Cousera:

https://www.coursera.org/learn/dsp

Page 5: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Final Score◼ Assignment : (10%)◼ Quizzes & Discussions (20%)◼ Examination (70%, Final)

◼ Lab course: (separate 100%)

Page 6: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ Fun in DSP

Wechat Public Account: professorwan

Click DSP zone

Page 7: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Course Outline◼ signal and systems

◼ Frequency and transform-domain analysis (Fourier transform, z-transform, discrete Fourier transform, fast Fourier transform…)

◼ Digital processing of analog signals (Sampling, reconstruction, quantization …)

of discrete-time systems

◼ Filter design - (IIR, FIR)

◼ Examples: DSP in life and applications

◼ Lab Course – your realization of DSP

Page 8: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Digital Signal Processing

Page 12: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Digital Signal Processing

◼ Signal: Convey information about the state or behavior of a physical system.

◼ Examples:

Voltage, Current, Temperature, Speed…

Different from INFORMATION

Page 13: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ Speech signal: 1D

◼ Image signal: 2D

◼ Multidimensional signals: Video (3D)…

Page 14: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Classification of Signals◼ Signals are represented mathematically as functions of one or

more independent variables.

◼ A common convention of the variable: Time

◼ For a signal, both the variable of time and the amplitude can either be continuous or discrete.

Page 15: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Classification of Signals

Page 16: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Digital Signal or NOT?

Air Quality Index AQI

中国天气网

Page 17: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Digital Signal or NOT?

上证综合指数SSE Composite

Index新浪财经

http://finance.sina.com.cn/realstock/company/sh000001/nc.shtml

Page 18: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Digital Signal or NOT?

Speech Signaland its Samples

Page 19: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Digital Signal – long history…

Stone TabletFlood in Nile 2500 B.C.

GoetheTemperature

in Yena1820 A.D.

the Great Ultimate, the

Eight Hexagrams, to be determined;I Ching,1000B.C.

Page 20: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Example of digital signals

Page 21: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Digital Signal Processing◼ Process the signal: analysis, interpretation, and manipulation.

◼ Signal processing has a long and rich history.

◼ Applications

communications, entertainment, military, space exploration, medicine, archaeology…

Everywhere…

Page 22: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Why digital signal processing?

◼ Digital devices: PC, VLSI digital signal processors

◼ Advantages (over analog signal proc.):

Flexible and programmable

Reliable and accurate

Easy to implement by VLSI

Think about A vs D in Mobile, Tape&CD, TV set, Communications…

Page 23: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Finding DSP in the real world…

◼ Telecommunications

Digital Network - DSP

0101000001 0101000001

A/D D/AMore examples of DSP?

Page 24: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Finding DSP in the real world…

Page 25: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Finding DSP in the real world…

◼ Recognize telephone number through the sound of keypad

95588

Page 26: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

More…

Page 27: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Outline

◼ Introduction

◼ Discrete-time signals

Basic operations

Basic sequences

Page 28: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Discrete-Time Signals: Sequences

◼ Discrete-time signals are usually represented mathematically as sequences of numbers

n is an integer!!!

−= nnxx ]},[{

Page 29: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Discrete-Time Signals: Sampling

◼ In practice, discrete-time signals may arise from periodic sampling of analog signals

Page 30: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Discrete-Time Signals

◼ Mathematical representation

−= nnTxnx a ),(][

n is an integer and T is the sampling period

Page 31: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ Graphical Representation

x[n] - > y[n] = x[n/2]?

Not existing

0 1 2-1-2

-3-4-5 3 4 5

6

x[0]

x[2]

x[3]

x[-1]x[1]

Page 32: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Basic Operations of Sequences

◼ Product and Sum: sample-by-sample

0 1 2

3 4

x[0]

x[2]

x[1]

x[n]

0 1

2y[0]

y[2]

y[1]

3 4

y[n]

x[n] y[n]

0 1

2 3

4

x[n]+y[n]

0 1 2 3 4

Page 33: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Basic Operations of Sequences

◼ Multiplication a sequence by a number

multiplication of each sample value by

0 1 2

3 4

x[0]

x[2]

x[1]

x[n]0 1 2

3 42x[n]

Page 34: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Basic Operations of Sequences

◼ Delay or shift][][ 0nnxny −=

0

0

0

0

n

n

0 1 2

3 4

x[0]

x[2]

x[1]

x[n]

0 1 2 4

x[0]

x[2]

x[1]

x[n-2]

3

Page 35: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Basic Operations of Sequences

◼ Delay or shift

][][ nxny −= ][][ mnxny =

][][ 0nnxny −=0

0

0

0

n

n

0 1 2

3 4

x[0]

x[2]

x[1]

x[n]

0 1 2 4

x[0]

x[2]

x[1]

x[n-2]

3

Page 36: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Basic Sequences

◼ Unit sample sequence

◼ Often referred to as discrete-time impulse or impulse

=

=

.0,1

,0,0][

n

nn

0

1

Page 37: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ A delayed impulse

◼ Representing an arbitrary sequence using a sum of scaled, delayed impulses.

=

=−

.,1

,,0][

kn

knkn

]3[]1[]2[][ 312 −+−++= − nanananp

−=

−=k

knkxnx ][][][

Page 38: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Basic Sequences

◼ Unit step sequence

=

.0,0

,0,1][

n

nnu

0

1

u[n]

Page 39: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ Represent a unit step sequence using impulses

−=

=

=

−=

+−+−+=

n

m

k

m

knnu

nnnnu

][

][][

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

0

0

1

?][ =n

Page 40: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Basic Sequences

◼ Sinusoidal sequence

with parameters real constants

-5 0 5 10 15 20 25-2

-1.5

-1

-0.5

0

0.5

1

1.5

2

nallfornAnx ),cos(][ 0 +=

Page 41: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Page 16, Figure 2.5 cos ω0n for several different values of ω0. As ω0 increases from zero toward π (parts a-d), the

sequence oscillates more rapidly. As ω0 increases from π to 2π (parts d-a), the oscillations become slower.

Page 42: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Basic Sequences

◼ Exponential sequence (real)

If the parameters are real constants, the sequence is real.

-5 0 5 10 15 20 25-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

......

nallforAnx n ,][ =

1

Page 43: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ Exponential sequence (complex)

)sin()cos(

,][

00

)( 0

0

+++=

=

=

=

+

nAjnA

eA

eeA

andAcomplexforAnx

nn

njn

njnj

n

frequency phase1 =

Page 44: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ Why complex?

}Re{}Re{

sinsincoscos)cos(

)(

jnjnj eee

nnn

=

+=+

+

Page 45: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

1010

][ )3.01.0(

= +−

n

enx nj

Page 46: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

nj

njnj

nj

nj

Ae

eAe

Aeny

Aenx

0

0

0

0

2

)2(][

][

=

=

=

=

+

][][ nynx =

r 20 +In a general case, when complex exponential sequences have frequencies of

, where r is an integer, those sequences are identical.

0

0 20

Page 47: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ Periodic sequences

where N is an integer - period.

nallforNnxnx ],[][ +=

Page 48: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ E.g. 1

8

][

)4/cos(

)24/cos(

)4/)8(cos(]8[

),4/cos(][

=

=

=

+=

+=+

=

N

nx

n

n

nnx

nnx

Page 49: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ Is a sinusoidal or complex exponential sequence always periodic ?

Page 50: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

)cos(

))(cos(][

)cos(][

00

0

0

NnA

NnANnx

nAnx

++=

++=+

+=

kN

kN

Nnxnx

)/2(

2

][][

0

0

=

=

+=

N and k integers

Or is rational0/2

The conditions for periodicity of sinusoidal

Page 51: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ E.g. 3 Find out the period of N

=8

=16

N

N

Differences from continuous time

Increasing does not decrease the period!0

[ ] cos( )

[ ] cos( /4 )

[ ] cos(3 /8 )

x n n

x n n

x n n

=

=

=

)cos(][

),cos(][

NnNnx

nnx

+=+

=

integer is ,2

][][

rrN

then

Nnxnx

if

=

+=

Page 55: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

◼ The periodicity of sinusoidal and complex exponential sequences is dependent on their frequencies.

◼ A sequence without periodicity is called aperiodic.

Page 56: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Think and share…

◼ The discrete-time effect in life – how do you perceive the world or judge a

person?

Page 57: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Conclusions◼ Signals, digital signal processing◼ Discrete-time signals: sequences

Basic operations (product, sum, multiplication, and delay)Basic sequences (impulse, unit step sequence, real exponential sequence, complex exponential sequence, sinusoidal sequence, and periodic sequence)

◼ Next lecture: discrete-time systems & LTI systems

Page 58: Digital Signal Processingnwpu-dsp.com/Lecture_notes/1-1 Signals.pdf · 2020-01-06 · swan@nwpu.edu.cn Course Outline signal and systems Frequency and transform-domain analysis (Fourier

[email protected]

Assignment

◼ Preparation for the next lecture:

read p16-p30

◼ Do the self-test

◼ Solve the following problems