Sei sulla pagina 1di 16

3/8/2019

Discrete 1
Techniques

Chapter 04

Discrete Time Signal


Processing Techniques

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete 2
Techniques

Spring 2019

ME-3504

Engineering Mathematics 4
Transformation Techniques
4th Semester (Mechatronics)
SZABIST, Karachi

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

1
3/8/2019

Discrete 3
Techniques

Engr. Humera Rafique


Assistant Professor
(Department of Mechatronic Engineering)
humera.rafique@szabist.edu.pk
Office: 100 Campus R-404

Course Support: Zabdesk Spring 2019

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques Chapter Contents 4

• Discrete Time Signals


• Discrete Time Convolution
• Properties and Theorems
• Discrete Time Correlation
• Computation
• Types

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

2
3/8/2019

Discrete
Techniques
Discrete Time Convolution 5

Discrete Time Signals


Signal Types:

• Causal:
Signal that depends on present and past elements

• Anti Causal:
Signal that depends on present and future elements

• Non Causal:
Signal that depends on present, past and future elements

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Discrete Time Convolution 6

Discrete Time Signals


Signal Representation:
0 , 1 , 2 ,……..,

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

3
3/8/2019

Discrete 7
Techniques

Discrete Time
Convolution

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Discrete Time Convolution 8

DT Convolution
x[n] y[n]
h[n]

∗ℎ ·ℎ

Methods:

1. Graphical
2. Analytical
3. Vector/Matrix

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

4
3/8/2019

Discrete
Techniques
Discrete Time Convolution 9
DT Convolution
∗ℎ ·ℎ
Algorithm:

1. Folding: ℎ

2. Shifting: ℎ

3. Multiplication: ·ℎ

4. Summation:
·ℎ All products of step 3

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Discrete Time Convolution 10
DT Convolution
∗ℎ ·ℎ
Example: Using Graphical method compute convolution:

1,2,2,1,1 ; ℎ 3,2,1 ! " 1

Flipping

x(n) 0 0 1 2 2 1 1
Sum
h(n-0) 1 2 3 0 0 0 0
y(0) 0 0 3 0 0 0 0 3

x(n) 0 0 1 2 2 1 1
Sum
Shift → h(n-1) 0 1 2 3 0 0 0
y(1) 0 0 2 6 0 0 0 8

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

5
3/8/2019

Discrete
Techniques
Discrete Time Convolution 11
DT Convolution
Example: 1,2,2,1,1 ; ℎ 3,2,1

x(n) 0 0 1 2 2 1 1
Sum
Shift → h(n-2) 0 0 1 2 3 0 0
y(2) 0 0 1 4 6 0 0 11

x(n) 0 0 1 2 2 1 1
Sum
Shift → h(n-3) 0 0 0 1 2 3 0
y(3) 0 0 0 2 4 3 0 9

x(n) 0 0 1 2 2 1 1
Sum
Shift → h(n-4) 0 0 0 0 1 2 3
y(4) 0 0 0 0 2 2 3 7

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Discrete Time Convolution 12
DT Convolution
Example: 1,2,2,1,1 ; ℎ 3,2,1

x(n) 0 0 1 2 2 1 1
Sum
Shift → h(n-5) 0 0 0 0 0 1 2
y(5) 0 0 0 0 0 1 2 3

x(n) 0 0 1 2 2 1 1
Sum
Shift → h(n-6) 0 0 0 0 0 0 1
y(6) 0 0 0 0 0 0 1 1

0 , 1 , 2 , 3 , 4 , 5 , 6

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

6
3/8/2019

Discrete
Techniques
Discrete Time Convolution 13
DT Convolution
Example: Using Analytical method compute convolution:

1,2,2,1,1 ; ℎ 3,2,1

! " 1 7
∗ℎ ·ℎ

' (

·ℎ ; 0,1, . . , 1
)

·ℎ ; 0,1, . . , 6
)

0 0 ℎ 0 0 ! 1 ℎ 0 1 ! 2 ℎ 0 2 !⋯! 6 ℎ,0 6-

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Discrete Time Convolution 14
DT Convolution

0 0 ℎ 0 0 ! 1 ℎ 0 1 ! 2 ℎ 0 2 ! 3 ℎ 0 3 ! 4 ℎ 0 4 ! 5 ℎ,0 5- 6 ℎ,0 6-

1 0 ℎ 1 0 ! 1 ℎ 1 1 ! 2 ℎ 1 2 ! 3 ℎ 1 3 ! 4 ℎ 1 4 ! 5 ℎ,1 5- 6 ℎ,1 6-

2 0 ℎ 2 0 ! 1 ℎ 2 1 ! 2 ℎ 2 2 ! 3 ℎ 2 3 ! 4 ℎ 2 4 ! 5 ℎ,2 5- 6 ℎ,2 6-

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

7
3/8/2019

Discrete
Techniques
Discrete Time Convolution 15
DT Convolution

3 0 ℎ 3 0 ! 1 ℎ 3 1 ! 2 ℎ 3 2 ! 3 ℎ 3 3 ! 4 ℎ 3 4 ! 5 ℎ,3 5- 6 ℎ,3 6-

4 0 ℎ 4 0 ! 1 ℎ 4 1 ! 2 ℎ 4 2 ! 3 ℎ 4 3 ! 4 ℎ 4 4 ! 5 ℎ,4 5- 6 ℎ,4 6-

5 0 ℎ 5 0 ! 1 ℎ 5 1 ! 2 ℎ 5 2 ! 3 ℎ 5 3 ! 4 ℎ 5 4 ! 5 ℎ,5 5- 6 ℎ,5 6-

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Discrete Time Convolution 16
DT Convolution

6 0 ℎ 6 0 ! 1 ℎ 6 1 ! 2 ℎ 6 2 ! 3 ℎ 6 3 ! 4 ℎ 6 4 ! 5 ℎ,6 5- 6 ℎ,6 6-

0 , 1 , 2 , 3 , 4 , 5 , 6

3, 8, 11, 9, 7, 3, 1

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

8
3/8/2019

Discrete
Techniques
Discrete Time Convolution 17
DT Convolution
Example: Using Vector method compute convolution:
0 ! 1 1
1,2,2,1,1 ; ℎ 3,2,1

232 234 234


. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . · . .

. . . . . . . . .

. . . . . . . . .

. . . . . . . . .

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Discrete Time Convolution 18
DT Convolution
Example: Using Vector method compute convolution: ! 1 7
"
1,2,2,1,1 ; ℎ 3,2,1

535 534 534

1 0 0 1 1 2 1 3 )
2 1 0 0 1 1 2 2 (
2 2 1 0 0 1 1 1 6
1 2 2 1 0 0 1 0 7
1 1 2 2 1 0 0 0 8
0 1 1 2 2 1 0 0 9
0 0 1 1 2 2 1 0 *
2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

9
3/8/2019

Discrete
Techniques
Discrete Time Convolution 19
DT Convolution
Example: Using Vector method compute convolution: ! " 1
1,2,2,1,1 ; ℎ 3,2,1 234
232

1 3 ! 0 2 ! 0 1 ! 1 1 2 1 3
2 3 ! 1 2 ! 0 1 ! 0 1 1 2 8
2 3 ! 2 2 ! 1 1 ! 0 0 1 1 11
1 3 ! 2 2 ! 2 1 ! 1 0 0 1 9
1 3 ! 1 2 ! 2 1 ! 2 1 0 0 7
0 3 ! 1 2 ! 1 1 ! 2 2 1 0 3
0 3 ! 0 2 ! 1 1 ! 1 2 2 1 1
2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Discrete Time Convolution 20
Properties of DT Convolution

• Commutative: ( ∗ 6 = 6 ∗ (

:( ∗ :6 = :6 ∗ :(

( ∗ 6 ! 7 = ( ∗ 6 ! ( ∗ 7
• Distributive:

( ∗ 6 ∗ 7 = ( ∗ 6 ∗ 7
• Associative:

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

10
3/8/2019

Discrete
Techniques
Discrete Time Convolution 21
Properties of DT Convolution

• Sampling: ∗; , -

( · 6 ↔ :( ∗ :6
• Convolution of DFT:

( ∗ 6 ↔ :( . :6

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Discrete Time Convolution 22

DT Convolution
%% CH 2 Convolution
x = [1 2 2 1 1]; h = [ 3 2 1];
y = conv(x,h)

y=

3 8 11 9 7 3 1

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

11
3/8/2019

Discrete 23
Techniques

Discrete Time Correlation

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Correlation 24

Discrete Time Correlation:


• A mathematical operation that closely resembles convolution

• Compares two signals to measure the degree of likeness or similarity

• Applications: RADAR, SONAR, Digital communication and Medical diagnostics

• Correlation combines three operations:

• Shifting
• Multiplication
• Addition (Accumulation)
Types:

• Auto

• Cross

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

12
3/8/2019

Discrete
Techniques
Correlation 25
Discrete Time Correlation:
Let x(n) and y(n) be two real signal sequences with finite energy, then,

Cross Correlation Function:


• A measure of similarities or shared properties between two signals

=0 > > , > 0, @1, @2, … …


?

Time shift or lag parameter

• Applications:
• Cross spectral density detection
• Signal recovery buried in noise, etc.

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Correlation 26
Discrete Time Correlation:
Auto Correlation Function:
• A measure of similarities or shared properties of a signal with its own
• Special case CCF, where x(n) = y(n)

=00 > > , > 0, @1, @2, … …


?

• Applications:
• Structure of signal in time domain
• Hidden properties of a signal

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

13
3/8/2019

Discrete
Techniques
Correlation 27
Discrete Time Correlation:
Properties:

1. ACF is an even sequence

2. CCF is an odd sequence

3. Correlation can be computed via convolution as:

=0 > > ∗ >

A B

= 0 > > ∗ >

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Correlation 28
Discrete Time Correlation:
Example (2.6.1) Proakis 4e: Determine the CCF of the given sequence:

… , 0,0,2, 1,3,7, 4, 2, 3,0,0, … , … , 0,0,1, 1,2, 2, C, 1, 2,5,0,0, …

x(n) 0 0 2 −1 3 7 1 2 −3 0 0 0 0

Shift 0 y(n) 0 0 1 −1 2 −2 4 1 −2 5 0 0 0
v(0) 0 0 2 1 6 −14 4 2 6 0 0 0 0

DEF G 0 =0 0 7

x(n) 0 0 2 −1 3 7 1 2 −3 0 0 0 0

Shift → y(n-1) 0 0 0 1 −1 2 −2 4 1 −2 5 0 0
v(1) 0 0 0 −1 −3 14 −2 8 −3 0 0 0 0

DEF G 1 =0 1 13

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

14
3/8/2019

Discrete
Techniques
Correlation 29

Discrete Time Correlation: Determine the CCF of the given sequence:

Example (2.6.1) Proakis 4e:


… , 0,0,2, 1,3,7, 4, 2, 3,0,0, … , … , 0,0,1, 1,2, 2, C, 1, 2,5,0,0, …

x(n) 0 0 2 −1 3 7 1 2 −3 0 0 0 0

Shift ← y(n+1) 0 1 −1 2 −2 4 1 −2 5 0 0 0 0
v(-1) 0 0 −2 −2 −6 28 1 −4 −15 0 0 0 0

DEF G 1 =0 1 0

=0 2 33 =0 2 18

=0 > 10, 9, 19, 36, 14, 33 , 0 , 5, 13, 18, 16, 7, 5, 3

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete
Techniques
Correlation 30
Discrete Time Correlation:
Example (2.6.1) Proakis 4e:

%% CH 2 Correlation

x = [0 2 -1 3 7 1 2 -3];
y = [1 -1 2 -2 4 1 -2 5];
If x and y are of different length, the
gema = xcorr(x,y)
shortest one is zero-padded.

gema =

Columns 1 through 8

0 10.0000 -9.0000 19.0000 36.0000 -14.0000 33.0000 -0.0000

Columns 9 through 15

7.0000 13.0000 -18.0000 16.0000 -7.0000 5.0000 -3.0000

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

15
3/8/2019

Discrete
Techniques Home Task 31

• Examples
• Matlab

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

Discrete 32
Techniques References
1. Text

2019 ،‫ ﻣﺎﺭچ‬08 ،‫ﺟﻣﻌﻪ‬ HR Spring 2019 EM4-TT CH 04

16

Potrebbero piacerti anche