EE123 Digital Signal Processing •Today

8
M. Lustig, EECS UC Berkeley EE123 Digital Signal Processing Lecture 2 1 M. Lustig, EECS UC Berkeley Today • Last time: – Administration – Overview • Today: – Another demo – Ch. 2 - Discrete-Time Signals and Systems 2 M. Lustig, EECS UC Berkeley Discrete Time Signals • Samples of a CT signal: • Or, inherently discrete (Examples?) x[n]= X a (nT ) n =1, 2, ··· X a (t) x[0] x[1] x[2] t T 2T 3T 3 • Unit Impulse • Unit Step M. Lustig, EECS UC Berkeley Basic Sequences δ [n]= 1 n =0 0 n 6=0 U [n]= 1 n 0 0 n< 0 n ··· n ··· 4

Transcript of EE123 Digital Signal Processing •Today

Page 1: EE123 Digital Signal Processing •Today

M. Lustig, EECS UC Berkeley

EE123Digital Signal Processing

Lecture 2

1

M. Lustig, EECS UC Berkeley

Today

• Last time:– Administration– Overview

• Today:– Another demo– Ch. 2 - Discrete-Time Signals and Systems

2

M. Lustig, EECS UC Berkeley

Discrete Time Signals

• Samples of a CT signal:

• Or, inherently discrete (Examples?)

x[n] = Xa(nT ) n = 1, 2, · · ·

Xa(t)x[0]x[1]

x[2]

tT 2T 3T

3

• Unit Impulse

• Unit Step

M. Lustig, EECS UC Berkeley

Basic Sequences

�[n] =

⇢1 n = 00 n 6= 0

U [n] =

⇢1 n � 00 n < 0

n

· · ·

n

· · ·

4

Page 2: EE123 Digital Signal Processing •Today

0 < ↵ < 1 ↵ > 1

↵ < �1�1 < ↵ < 0

M. Lustig, EECS UC Berkeley

Basic Sequences

• Exponentialx[n] =

⇢A↵

nn � 0

0 n < 0

n

· · ·

n

· · ·

n

· · ·n

· · ·

Bounded unBounded

5

x[n+N ] = x[n] for N integer

x[n] = A cos(!0n+ �)

x[n] = Ae

j!0n+j�

M. Lustig, EECS UC Berkeley

Discrete Sinusoids

Q: Periodic or not?

or,

6

x[n+N ] = x[n] for N integer

x[n] = A cos(!0n+ �)

x[n] = Ae

j!0n+j�

!0N = 2⇡KM. Lustig, EECS UC Berkeley

Discrete Sinusoids

• To find fundamental period N– Find smallest integers K,N :

Q: Periodic or not?

A: If is rational (Different than C.T.!)!0/⇡

or,

7

M. Lustig, EECS UC Berkeley

Discrete Sinusoids

• Example:

cos(5/7⇡n) N = 14 (K = 5)

cos(⇡/5n) N = 10 (K = 1)

cos(5/7⇡n) + cos(⇡/5n) ) N = S.C.M{10, 14} = 70

8

Page 3: EE123 Digital Signal Processing •Today

!0 = ⇡ !0 =3⇡

2

M. Lustig, EECS UC Berkeley

Discrete Sinusoids

• Another Difference:

Q: Which one is a higher frequency?

or

9

!0 = ⇡ !0 =3⇡

2

cos(⇡n) cos(3⇡/2n) = cos(⇡/2n)

M. Lustig, EECS UC Berkeley

Discrete Sinusoids

• Another Difference:

Q: Which one is a higher frequency?

or

n

· · ·· · ·n

· · ·· · ·

10

!0 = ⇡ !0 =3⇡

2

M. Lustig, EECS UC Berkeley

Discrete Sinusoids

• Another Difference:

Q: Which one is a higher frequency?

or

A: !0 = ⇡

N = 2

n

· · ·· · ·

N = 4

n

· · ·· · ·

11

M. Lustig, EECS UC Berkeley

Discrete Sinusoids

• Recall the periodicity of DTFTr -

L {.A/£ Afl: £1.tfOs1'1f o.A/

T[XsthJ-r jJtlrJjDJ ha."9ern{1 !

o.T{tLnJ]

12

Page 4: EE123 Digital Signal Processing •Today

M. Lustig, EECS UC Berkeley

Discrete Sinusoids

!0 = 0

!0 = ⇡/8

!0 = ⇡/4

!0 = ⇡

cos(w0n)

13

cos(w0n)

M. Lustig, EECS UC Berkeley

Discrete Sinusoids

!0 = ⇡

!0 =7

4⇡

!0 =15

8⇡

!0 = 2⇡

14

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

M. Lustig, EECS UC Berkeley

Discrete Time Systems

What properties?

• Causality:– y[n0] depends only on x[n] for ∞≤n≤n0

15

T{ax1[n]} = aT{x[n]} = ay[n]

M. Lustig, EECS UC Berkeley

Properties of D.T. Systems Cont.

• Memoryless:– y[n] depends only on x[n]

• Linearity:– Superposition:

– Homogeneity:

Example: y[n] = x[n]2

T{x1[n] + x2[n]} = T{x1[n]}+ T{x2[n]} = y1[n] + y2[n]

16

Page 5: EE123 Digital Signal Processing •Today

M. Lustig, EECS UC Berkeley

Properties of D.T. Systems Cont.

• Time Invariance:– If:Then:

• BIBO Stability– If:Then:

y[n] = T{x[n]}y[n� n0] = T{x[n� n0]}

|x[n]| B

x

< 1 8 n

|y[n]| B

y

< 1 8 n

17

y[n] = x[n� nd]

y[n] = x[Mn]

M > 1

M. Lustig, EECS UC Berkeley

Time Shift

Accumulator

Compressor

Causal L TI memorylessBIBOstable

if nd>=0 Y Y if nd=0 Y

Y Y Y N N

N Y N N Y

Example:

y[n] =nX

k=�1x[k]

18

y[n]

x[n� 1]

M. Lustig, EECS UC Berkeley

Examples

Why the compressor is NOT Time Invariant?

n

· · ·· · ·

Suppose M=2,

n

· · ·· · ·

x[n] = cos[⇡/2 n]

n

· · ·· · ·

6= y[n� 1]n

· · ·· · ·

19

y[n] = MED{x[n� k], · · · , x[n+ k]}

M. Lustig, EECS UC Berkeley

Examples

Non-Linear system: Median Filter * j0 cl] /MIL A_ NtJ»-l.f).)fN?_ S'(<;r£M.! .Mf/2!/VI ffLTF-f(

=- m£o [ r[JJ-k.'], ... 1 :X{n+-tJ1

, 1 '}CxJ - 0 Q 6 J :>

-i - -1

s • ?- e ee t ft, }'lhl

-----

20

Page 6: EE123 Digital Signal Processing •Today

M. Lustig, EECS UC Berkeley

Example: Removing Shot Noise

• From NPR This American Life, ep.203“The Greatest Phone Message in the World”

em.. (giggle) There comes a time in life, when .. eh... when we hear the greatest phone mail message of all times and .... well here it is... eh.. you have to hear it to believe it..

corrupted message

21

M. Lustig, EECS UC Berkeley

Spectrum of Speech

Speech

Corrupted Speech

22

M. Lustig, EECS UC Berkeley

Low Pass Filtering

LP-Filter Spectrum

23

Corrupted

M. Lustig, EECS UC Berkeley

Low-Pass Filtering of Shot Noise

LP-filtered

24

Page 7: EE123 Digital Signal Processing •Today

Med-filter

Corrupted

M. Lustig, EECS UC Berkeley

Low-Pass Filtering of Shot Noise

25

M. Lustig, EECS UC Berkeley

The Greatest Message of All Times...

• I thought you’ll get a kick out of a message from my mother......Hi Fred, you and the little mermaid can go blip yourself. I told you to stay near the phone... I can’t find those books.. you have other books here.. it must be in Le’hoya.. call me back... I’m not going to stay up all night for you... .... Bye Bye...

26

�[n] h[n]

y[n] = h[n] ⇤ x[n]

y[n] =1X

N=�1h[m]x[n�m]

LTI

M. Lustig, EECS UC Berkeley

Discrete-Time LTI Systems

• The impulse response h[n] completely characterizes an LTI system “DNA of LTI”

x[n]

discrete convolutionLTI

Sum of weighted, delayed impulse responses!

27

M. Lustig, EECS UC Berkeley

BIBO Stability of LTI Systems

• An LTI system is BIBO stable iff h[n] is absolutely summable

1X

k=�1|h[k]| < 1

28

Page 8: EE123 Digital Signal Processing •Today

Bx

1X

k=�1|h[k]| < 1

M. Lustig, EECS UC Berkeley

BIBO Stability of LTI Systems

• Proof: “if”

|y[n]| =

�����

1X

k=�1h[k]x[n� k]

�����

1X

k=�1|h[k]| · |x[n� k]|

Bx

29

M. Lustig, EECS UC Berkeley

BIBO Stability of LTI Systems

• Proof: “only if”– supposeshow that there exists bounded x[n] that gives unbounded y[n]

– Let:

P1k=�1 |h[k]| = 1

30