discrete convolution of two signals

28
Discrete Convolution of Two Signals In this animation, the discrete time convolution of two signals is discussed. Convolution is the operation to obtain response of a linear system to input x[n]. Considering the input x[n] as the sum of shifted and scaled impulses, the output will be the superposition of the scaled responses of the system to each of the shifted impulses. Authors Phani Swathi Mentor Prof. Saravanan Vijayakumaran Course Name: Signals and Systems Level: UG

Upload: sylvie

Post on 13-Feb-2016

277 views

Category:

Documents


14 download

DESCRIPTION

Discrete Convolution of Two Signals. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Discrete Convolution of Two Signals

Discrete Convolution of Two Signals

In this animation, the discrete time convolution of two signals is discussed. Convolution is the operation to obtain response of a linear system to input x[n]. Considering the input x[n] as the sum of shifted and scaled impulses, the output will be the superposition of the scaled responses of the system to each of the shifted impulses.

AuthorsPhani Swathi

MentorProf. Saravanan Vijayakumaran

Course Name: Signals and Systems Level: UG

Page 2: Discrete Convolution of Two Signals

Learning ObjectivesAfter interacting with this Learning Object, the learner will be able to:• Explain the convolution of two discrete time signals

Page 3: Discrete Convolution of Two Signals

Definitions of the components/Keywords:

5

3

2

4

1 Convolution of two signals:

The x[n] and h[n] are the two discrete signals to be convolved.

The convolution of two signals is denoted by which means

where k is a dummy variable.

Page 4: Discrete Convolution of Two Signals

Master Layout (Part 1)

5

3

2

4

1This animation consists of 2 parts:Part 1 – First method of convolution – Method 1 Part 2 – Alternate method of convolution – Method 2

Signals taken to convolve

Shifted version of h[n]

Scaled version of h[n]

Lines and dots have to appear at the same time. This is applicable to all figures

Page 5: Discrete Convolution of Two Signals

1

5

2

4

Step 1:

Instruction for the animator Text to be displayed in the working area (DT)

• The first two points in DT has to appear before the figures.

• Then the blue figure has to appear.• After that the red figure has to appear.• Then last two points in DT has to

appear after the blue and red figures.

• x[n] and h[n] are the two discrete signals to be convolved.• The convolution of the signals is denoted by which means where k is a dummy variable.

• x[n] has non-zero discrete impulses at x[1], x[2] and x[3].

• Therefore, y [n] can now be computed as y[n]= x[1]h[n-1]+x[2]h[n-2]+x[3]h[n-3] ; n ≥ 1

3

Page 6: Discrete Convolution of Two Signals

1

5

2

4

Step 2: Overall calculation of y[n]

Instruction for the animator Text to be displayed in the working area (DT)• The figures has to appear row wise.

First the blue fig. then red fig. and then the green figure has to appear.

• After the 9 figures appear row wise, all the fig. should appear at a time in the fashion shown above.

• x[n] has non-zero discrete impulses at x[1], x[2] and x[3].

• The summation of all the products of x[k]h[n-k] gives y[n].

• From definition, y[n] is the superposition of the scaled responses of the system to each of the shifted impulses.

3h[n-2]

h[n-3]

3

2

1

0 1 2 3 4 n

3

2

1

0 1 2 3 4 5 n

3

2

1

6

4

2

3

2

1

0 1 2 3 n

0 1 2 3 4 n

0 1 2 3 4 5 n

X[1]h[n-1]

X[2]h[n-2]

X[3]h[n-3]

Page 7: Discrete Convolution of Two Signals

1

5

32

4

Step 3: X[1]h[n-1]

Instruction for the animator Text to be displayed in the working area (DT)

• Show the fig in red and then X[1]h[n-1] has to appear• Then the green figure has to appear• After that the sentence “the scaled

signal x[1]h[n-1]” should appear

• The response due to the input x[k] applied at time k

• The time shift of h[n] is taken • Then scaling of h[n-1] with x[1] is done.• The signal x[1]h[n-1] is the same as h[n-1] since x[1]=1.

x[1]h[n-1]

3

2

1

0 1 2 3 n

Page 8: Discrete Convolution of Two Signals

1

5

2

4

Step 4: X[2]h[n-2]

Instruction for the animator Text to be displayed in the working area (DT)

• First show the figure in red and then labeling h[n-2] should appear

• Then the green figure has to appear• After that the sentence “the scaled

signal x[2]h[n-2]” should appear

• The next time shift of h[n-1] is taken • Then scaling of h[n-2] with x[2] is done.• The signal x[2]h[n-2] is the doubled version of h[n-2] since x[2]=2.

1

5

2

4

Step

3

h[n-2]

3

2

1

0 1 2 3 4 n

X[2] h[n-2]6

5

4

3

2

1

0 1 2 3 4 n

Page 9: Discrete Convolution of Two Signals

1

5

2

4

Step 5: X[3]h[n-3]

Instruction for the animator Text to be displayed in the working area (DT)

• First show the figure in red and then labeling h[n-3] should appear

• Then the green figure has to appear• After that the sentence “the scaled

signal x[3]h[n-3]” should appear

• The next time shift of h[n-3] is taken • Then scaling of h[n-3] with x[3] is done.• The signal x[3]h[n-3] is the same as h[n-3] since x[3]=1.

0 1 2 3 4 5 n

3

2

1

h[n-3]

0 1 2 3 4 5 n

3

2

1

x[3]h[n-3]

3

Page 10: Discrete Convolution of Two Signals

1

5

2

4Instruction for the animator Text to be displayed in the working area (DT)

• First the symbol y[n] must appear and then the figure in green must appear.

• The output of the system y[n] =x[1]h[n-1]+x[2]h[n-2]+x[3]h[n-3]

1

5

2

4

Step 6: Y[n]

3

8

7

6

5

4

3

2

1

0 1 2 3 4 5 6 7 8 n

Y[n]

Page 11: Discrete Convolution of Two Signals

Instructions/ Working area

Introduction

Credits

11

Definitions Test your understanding (questionnaire) Lets Sum up (summary) Want to know more…

(Further Reading)

Try it yourself

Demo

Activity

Interactivity:

Analogy

Slide 1

Slide 3

Slide 26

Slide 28

Slide 27

Use STAM templateElectrical Engineering

Fig. 1 Fig. 2

Fig. A Fig. B Fig. C

Fig. A Fig. B Fig. C

The correct answer is shown in red

Page 12: Discrete Convolution of Two Signals

1

5

32

4

Interactivity option 1: Step No 1:

Interactivity type (IO 1/IO 2)

Instruction to learners

Boundary limits & options

Instruction to animators

Results and output

Choose from fig. A,B & C.

Find the convolution of x[n] and h[n]

• Show fig 1, fig.2 in the question part.

• show fig. B as the output.

Fig. 1

3

2

1

0 1 2 3 4 5 0 1 2 3 4 5

y[n]

Fig. 2

3

2

1

0 1 2 3 4 5 n

Fig.1

3 2

1

-1 0 1 2 3 4 5 n Fig.2

x[n] h[n]

Page 13: Discrete Convolution of Two Signals

1

5

32

4

Interactivity option 1: Step No 2:

Interactivity type (IO 1/IO 2)

Instruction to learners

Boundary limits & options

Instruction to animators

Results and output

Find the convolution of x[n] and h[n]

• Show fig. A, fig. B and fig. C as the options

• show fig. B as the output.

Fig. 1

3

2

1

0 1 2 3 4 5 0 1 2 3 4 5

y[n]

Fig. 2

12

10

8

6

4

2

0 1 2 3 4 5 6 n

a) Fig. A

12

10

8

6

4

2

0 1 2 3 4 5 6 nb) Fig. B

Y[n] Y[n]

Page 14: Discrete Convolution of Two Signals

1

5

32

4

Interactivity option 1: Step No 3:

Interactivity type (IO 1/IO 2)

Instruction to learners

Boundary limits & options

Instruction to animators

Results and output

• show option B as the output.•If the user chooses ‘B’ remark “correct answer” should appear if not “wrong answer” should appear.

Fig. 1

3

2

1

0 1 2 3 4 5 0 1 2 3 4 5

y[n]

Fig. 2

12

10

8

6

4

2

0 1 2 3 4 5 6 n

c) Fig. C

Y[n]

Page 15: Discrete Convolution of Two Signals

5

3

2

4

1Master Layout (Part 2)

This animation consists of 2 parts:Part 1 – First method of Convolution – Method 1Part 2 – Alternate method of Convolution – Method 2

……. -3 -2 -1 0 1 2 3 …….

X[n]h[n]

1 2 3

Signals taken to convolve

Result signal of convolutionThe dotted lines represent y[n]The thicker line represents only y[4]

Page 16: Discrete Convolution of Two Signals

1

5

2

4

Step 1:

Instruction for the animator Text to be displayed in the working area (DT)

• First sentence in DT is to appear before the figures.

• Then the blue fig. has to appear and then the red fig.

• The text in last two sentences in DT has to appear after the blue figure.

• x[n] and h[n] are the two signals taken to convolve.• x[k] has 7 non-zero impulses from -3 to +3 with an amplitude of 2.

so, it is difficult to use method 1 . • Then Y[n] is calculated using formula.

3

X[n]

….-3 -2 -1 0 1 2 3…..

2

h[n]

1 2 3 n

Page 17: Discrete Convolution of Two Signals

1

5

2

4

Step 2:

Instruction for the animator Text to be displayed in the working area (DT)

• First the blue fig. has to appear then the red fig.

• The text in first two sentences in DT has to appear after the blue figure.

• The sentences from 3 onwards in DT should appear after the red fig.

• h[n-k] is the time reversal and shifted version of h[n] as shown in the figure.

• h[n-k] is h[0] when k= n

• Similarly, h[n-k] is h[1] when k=n-1

• h[n-k] is h[2] when k= n-2 and so on.

3

X[k]

-3 -2 -1 0 1 2 3

h[n-k]

k=n-2 k=n-1 k= n

32

12

k

Page 18: Discrete Convolution of Two Signals

1

5

2

4

Step 3:

Instruction for the animator Text to be displayed in the working area (DT)

• The text in DT has to appear after the blue and red figures in slide 16.

• If x[n] or h[n] have large number of impulses then method 1 is probably inconvenient to use.

• Here y[n] can be calculated easily if the boundary conditions are known.

• If x[k] is non-zero between and h[k] is non-zero between

and h[k] has N impulses, then

• From this , it is understood that y[n] is zero if i.e,

and i.e,

3

Page 19: Discrete Convolution of Two Signals

1

5

2

4

Step 4:

Instruction for the animator Text to be displayed in the working area (DT)

• First the blue fig. and then the red fig. has to appear.

• The text in DT has to appear after the red fig.

• h[4-k] is the time reversal and shifted version of h[n] as shown in the figure.

3

X[k]

-3 -2 -1 0 1 2 3

h[4-k]

2 3 4 k

Page 20: Discrete Convolution of Two Signals

1

5

2

4

Step 5: X[k]h[4-k]

Instruction for the animator Text to be displayed in the working area (DT)

• The text in DT has to appear after the red fig.

• Y[4] can be calculated by summing all the values of product of x[k]h[4-k].

i.e,

3

X[k]h[4-k]

2 3 4

6

42

Page 21: Discrete Convolution of Two Signals

1

5

2

4Instruction for the animator Text to be displayed in the working area (DT)

• First the symbol y[4] must appear and then the figure in green must appear.

• Both the lines and the balls should appear at a time.

• After the figure, the text in DT has to appear.

• For example, to find y[4] • The output of the system y[4] is the summation of x[k]h[n-k]

• That is given as y[4] = x[0]h[4-0]+x[1]h[4-1]+x[2]h[4-2]+x[3]h[4-3]+x[4]h[4-4]

• The dotted lines represent the solution for y[n].

1

5

2

4

Step 6: Y[4]

3

12

10

8

6

4

2

0 1 2 3 4 5 6 7 8 9 n

Y[4]

Page 22: Discrete Convolution of Two Signals

Instructions/ Working area

Introduction

Credits

22

Definitions Test your understanding (questionnaire) Lets Sum up (summary) Want to know more…

(Further Reading)

Try it yourself

Demo

Activity

Interactivity:

Analogy

Slide 1

Slide 3

Slide 26

Slide 28

Slide 27

Use STAM templateElectrical Engineering

Fig. 3 Fig. 4

Fig. a Fig. b Fig. c

Fig. a Fig. b Fig. c

Page 23: Discrete Convolution of Two Signals

1

5

32

4

Interactivity option 1: Step No 1:

Interactivity type (IO 1/IO 2)

Instruction to learners

Boundary limits & options

Instruction to animators

Results and output

Choose from fig. a, b & c

Find the value of y[5]

• Show fig 3, fig.4 in the question part.

• show fig. c as the output.

Fig. 1

3

2

1

0 1 2 3 4 5 0 1 2 3 4 5

y[n]

Fig. 2

4

3

2

1

0 1 2 3 4 5 6 n

Fig.3

3

2

1

0 1 2 3 4 5 6 n Fig.4

x[n] h[5-k]

Page 24: Discrete Convolution of Two Signals

1

5

32

4

Interactivity option 1: Step No 2:

Interactivity type (IO 1/IO 2)

Instruction to learners

Boundary limits & options

Instruction to animators

Results and output

Hint: h[5-k] = h[1]

When k=4

• Show fig. a, fig. b and fig. c as the options

• show fig. c as the output.

Fig. 1

3

2

1

0 1 2 3 4 5 0 1 2 3 4 5

y[n]

Fig. 2

3

2

1

0 1 2 3 4 5 6 n

a) Fig. a

4

3

2

1

0 1 2 3 4 5 6 n b) Fig. b

Y[5] Y[5]

Page 25: Discrete Convolution of Two Signals

1

5

32

4

Interactivity option 1: Step No 3:

Interactivity type (IO 1/IO 2)

Instruction to learners

Boundary limits & options

Instruction to animators

Results and output

• show option c as the output.•If the user chooses ‘c’ remark “correct answer” should appear if not “wrong answer” should appear.

Fig. 1

3

2

1

0 1 2 3 4 5 0 1 2 3 4 5

y[n]

Fig. 2

4

3

2

1

0 1 2 3 4 5 6 n

c) Fig. c

Y[5]

Page 26: Discrete Convolution of Two Signals

Questionnaire1.

Find the value of y[6]

Answers: a) b)

2.The Convolution sum is given as ___________ Answers: The correct answers are given in red.

1

5

2

4

3

3

2

1

0 1 2 3 4 5 6

x[n]

3

2

1

0 1 2 3 4 5 6

h[n]

10

8

6

4

2

0 1 2 3 4 5 6

8

6

4

2

0 1 2 3 4 5 6

Page 27: Discrete Convolution of Two Signals

Links for further reading

Reference websites:

Books: Signals & Systems – Alan V. Oppenheim, Alan S. Willsky, S. Hamid

Nawab, PHI learning, Second edition.

Research papers:

Page 28: Discrete Convolution of Two Signals

Summary• In discrete time, the representation of signals is taken to be the

weighted sums of shifted unit impulses.• This representation is important, as it allows to compute the

response of an LTI(Linear Time Invariant) system to an arbitrary input in terms of the system’s response to a unit impulse.

• The convolution sum of two discrete signals is represented as

where

• The convolution sum provides a concise, mathematical way to express the output of an LTI system based on an arbitrary discrete-time input signal and the system‘s response.