You are on page 1of 17

Digital Signal Processing

Discrete-time signal processing


Sampling, no digitization

Digital Signal Processing


Sampling, digitization

Digital Signal Processing


Chapter 2: Discrete-time Signals and Systems

Signal:
Digital Signal Processing Any function of one or more variables which contains useful information

Signals
One dimensional
Speech signals

Multi-dimensional
Pictures 1 2

Digital Signal Processing


Discrete-time signals
May be discrete from the beginning Could have been the result of sampling a continuous time signal

Discrete-Time Sequences
Discrete-time sequence

x = {x[n ]} ,

< n < ,

Graphical representation of a discrete-time signal. x(t)


Cont.-time Signal

A-to-D

x[n] Discrete-time Processing

y[n]

D-to-A

y(t)

Discrete-Time Sequences
x[n] = xd (nT )
< n < ,

Basic Sequences
Delayed or shifted version of x[n]:
y[n] = x[n n0 ]

Segment of a continuous-time speech signal.

Unit sample sequence

[ n] =

0 n 0 1 n = 0

Sequence of samples obtained with T=125 us

Basic Sequences
Any sequence can be represented as a sum of scaled, delayed impulses
p[n] = a3 [n + 3] + a1 [n 1] + a2 [n 2] + a7 [n 7]
x[n] =

Basic Sequences
Unit Step sequence
1 n 0 u[n] = 0 n < 0

k =

x[k ] [n k ]

u[n] = [n k ]
k =0

Basic Sequences
Sinusoidal sequences
x[n] = A cos(0 n + ), for all n,

Periodic Signals
cos(0 n)

10

Periodic Signals
cos(0 n)

Basic Sequences
Exponential sequences

x[n] = A n .

11

12

Basic Sequences
Exponential sequence where is complex

Basic Sequences
x[n] = A n .
Complex exponential sequence

= e j

A = A e j
n

x[n] = Ae j (0 + 2 ) n
= Ae j0 n e j 2 n = Ae j0 n .

x[n ] = A n = A e j e j0 n
= A e j (0n + )
n

= A cos(0 n + ) + j A sin(0 n + ).
n n

If

=1

x[n] = A e j (0 n + ) = A cos(0 n + ) + j A sin(0 n + )


13 14

Discrete-time Systems
Any operation that maps an input sequence to an output sequence

Discrete-time Systems
Example: Ideal delay System
y[n] = x[n n d ], < n <

y[n] = T {x[n]}
Example: Moving average system
y[n ] =
M2 1 x[n k ] M 1 + M 2 + 1 k = M1 1 {x[n + M 1 ] + x[n + M 1 1] + L + x[n] = M1 + M 2 + 1 + x[n 1] + L + x[n M 2 ]}

15

16

Discrete-time Systems
Moving average

Discrete-time Systems
Memoryless system Example:

y[n ] = ( x[n ]) ,
2

for each value of n.

17

18

Linear Systems
If
x1 [n] y1 [n]
T

Linear Systems
Accumulator
y[n ] =

x2 [n] y2 [n]
T

k =

x[k ]

Then
T {x1 [n ] + x2 [n ]} = T {x2 [n ]} + T {x2 [n ]} = y1 [n ] + y 2 [n ] T {ax[n ]} = aT {x[n ]} = ay [n ],

Linear?

Or we can combine the two conditions as

T {ax1 [n] + bx2 [n]} = aT {x1 [n]}+ bT {x2 [n]}


19 20

Time Invariance
If
x1 [n] y1 [n]
T

Time Invariance
Example:
y[n] = x[Mn], < n < ,

Then

x1 [n n0 ] y1 [n n0 ]
T

Time invariant?

Example:

y[n ] =

k =

x[k ]

y1 [n] = x1 [Mn] = x[Mn n 0 ]


y[n n 0 ] = x[M (n n0 )].

Time invariant?

LTI Systems: Linear and time-invariant

21

22

Causality
A system is causal if the output at time n only depends on the current and previous inputs. The system is not anticipative

Stability
Bounded input bounded output (BIBO) If the input sequence is bounded such that
x[n] Bx <

for all n.

the output sequence is bounded, i.e., Examples: Forward and backward difference systems
y[n] By <

for all n.

y[n] = x[n+1] x[n] y[n] = x[n] x[n-1]

Not Causal Causal

23

24

LTI Systems
LTI Systems are completely characterized by their impulse response.
Given the input signal, the output can be determined.
y[n] = T x[k ] [n k ] k =
y[n ] =

Convolution
y[n] =
k =

x[k ] h[n k ] = h[k ] x[n k ]


k =

1. Flip one sequence (say h[k]) around origin 2. Shift the flipped sequence 3. Multiply by the other sequence and add

h[-k] h[n-k]

k =

x[k ] T { [n k ]} = x[k ] h[n k ]


k =

y[n] = x[n] * h[n]

Convolution
25 26

Output of an LTI System

Output of an LTI System

27

28

Convolution

Convolution Example

h[n] = (1, 2, 3)

x[n] = (1, 1, 1)

y[n] = x[n] * h[n] = ?

29

30

Convolution Example
1, 0 n N 1, h[n] = u[n] u[n N ] = 0, otherwise.

Example

x[n] = a n u[n].
y[n] =

k = n

x[k ] h[n k ] = a
k =0

h[ n k ]

= ak
k =0

for 0 n N 1.
=

In general:

k = N1

n2

N N 1
1

2 +1

N 2 N1

Thus

y[n] =

1 a n+1 , 1 a

0 n N 1.
31 32

Example (Cont.)
When n>N-1

Properties of LTI Systems


These properties can be proved easily using the definition of convolution operation. Commutative property

x[n] h[n] = h[n] x[n]


y[n] =

m =

x[n m] h[m] = h[m]x[n m] = h[n] x[n]


m =

Distributive property

x[n] (h1 [n] + h2 [n]) = x[n] h1 [n] + x[n] h2 [n]

33

34

Properties of LTI Systems


Serial combination of DT systems

Properties of LTI Systems


Parallel combination of DT systems

h1[n]

h2[n]

h2[n]

h1[n]

h1[n]* h2[n]
35 36

Properties of LTI Systems


LTI systems are BIBO stable if and only if the impulse response is absolutely summable
S=

Stability Condition: Proof


Necessity condition:
y[k ] =
k =

h[k ]x[n k ] h[k ] x[n k ] .


k =

k =

h[k ] <

If

x [n ] B x

then

y [n ] B x

k =

h [k ].

Sufficiency condition: If above condition is not held, a bounded input sequence can be found for which the output is not bounded
h* [ n] x[n] = h[ n] 0, h[ n] 0, h[ n] = 0,
=

y[0] =
37

k =

x[ k ]h[k ] =

k =

h[k ]

h[k ]

k =

h[k ]

absolutely summable

If the sequence is not

38

Causality
LTI systems are causal if and only if

Discrete-time Systems
Finite impulse response (FIR)
Impulse response has a finite length in which values are non-zero

h[n] = 0,

n<0

Show!

Infinite impulse response (IIR)

39

40

Example
Causal and stable? FIR or IIR? Ideal delay system:
y[n] = x[n n d ]

Example
Causal and stable? FIR or IIR? Accumulator:
h[n ] =

y[n ] =

k =

x[k ]
n0 n<0

h[n] = [n nd ]
Moving average system:
y[n] =
h [n ] =

nd a positive fixed integer

k =

[k ] = 0,

1,

= u[n].

Forward Difference

y[n] = x[n + 1] x[n]

h[n] = [n + 1] [n]
M2

1 x[n k ] M 1 + M 2 + 1 k = M1
1 M1 n M 2 , otherwise.
41

Backward Difference

y[n] = x[n] x[n 1]

M2 , 1 M [n k ] = M 1 + M 2 + 1 M 1 + M 2 + 1 K = 1

h[n] = [n] [n 1]
42

0,

Discrete-time Systems
FIR systems are always stable. Being IIR, does not mean unstable! Example:

Linear Constant-Coef. Difference Equations


A sub-class of LTI systems can be represented with difference equations of the form

ak y[n k ] = bm x[n m]
a <1
k =0 m =0

x[n] = a u[n].
n

S =a
n =0

Example: Difference equation for accumulator system:


y[n ] =

1 S= < 1 a

Stable System !

k =

x[k ]

y[n] = x[n] + y[n 1]

43

44

Frequency Domain Representation


Fourier Transform:
H ( e j ) =
k =

Examples:
Frequency response of ideal delay

h[k ] e

j k

H (e j ) = e j nd
j

H ( e j ) = H ( e j ) e j p H ( e
A complex continuous function Periodic with period 2

Magnitude and phase?

Fourier transform of a discrete-time sequence is:

H ( e j ( + 2 ) ) =

n =

h[n] e

j ( + 2 ) n

e j ( + 2 ) n = e j n e j 2 n = e j n
In general:

H (e j ( + 2 ) ) = H (e j ).

H ( e j ( + 2 r ) ) = H ( e j )

45

46

Examples: Moving Average System


Frequency response of moving average system:
1 , M1 n M 2 h[n] = M 1 + M 2 + 1 0, otherwise

H (e j ) = =

1 sin [ ( M 1 + M 2 + 1) / 2] j ( M 2 M 1 ) / 2 e sin [ / 2] M1 + M 2 + 1

M2 1 e j n M 1 + M 2 + 1 n= M1

47

48

Example (Cont.)

Examples: Moving Average System


Magnitude and phase of the frequency response of the moving-average system for the case M1=0 and M2 = 4.

49

50

Ideal Frequency-Selective Filters


Ideal lowpass filter

Ideal Frequency-Selective Filters


(a) Highpass filter

(b) Bandstop filter

(c\ Bandpass filter


51 52

Inverse Fourier Transform


Fourier Transform pair:
X e

Inverse Fourier Transform

1 2

( ) = x[n]e
j n =

j n

j ( nm)

= =

x[n] =

1 2

X (e )e d
j j n

sin (n m ) (n m ) m=n 1, mn 0, [n m]

Proof of inverse:
1 2 j m j n m x[m ] e e d = x[n ] =

x[n ] =

m =

x[m] [n m] = x[n]

x[n] =

m =

x[m] 2 e

j ( nm )

d
53 54

Properties of Fourier Transform


Linearity

Properties of Fourier Transform


Convolution
x[n] F X e j

( ) x [n] X (e )
x1 [n] F X 1 e j
F 2 2 j

( )
( )

a x1 [n] + b x2 [n] a X 1 e
F

( )+ bX (e )
j j 2

h[n] F H e j
y[n]=

Time Shifting and frequency shifting

k =

x[k ]h [n k ] = x[n] h[n]

x[n] F X e j

( )
( )
)
55

Y e j = X e j H e j
Convolution in time-domain

( )

( ) ( )
Multiplication in freq. domain

x[n nd ] F e j n d X e j
e
j 0 n

x[n ] F X e j ( 0)

56

Example

57

58

Example

Example

59

60

Example 2.29 (Cont.)


61

62

Symmetry Property of Fourier Transform

Magnitude

Symmetry Property of Fourier Transform

Real part

Phase

Imaginary part

Frequency response for a system with impulse response h[n] = an u[ n]. a > 0; a =0.9 (solid curve) and a=0.5 (dashed curve).
63

Frequency response for a system with impulse response h[n] = an u[ n]. a > 0; a =0.9 (solid curve) and a=0.5 (dashed curve).
64

Existence of Fourier Transform


Does the infinite sum converge to a finite value?

X e j <
X e j =

( )

( ) x[n]e
n = n =

j n

x[n]

e j n

n =

x[n] <

If the sequence is absolute summable, its Fourier transform exists. (Sufficient Condition)
65 66

Questions ?

67

You might also like