EEE 3105: Signals and Linear Systems: K N H K X N y

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

11/18/2021

EEE 3105: Signals and Linear Systems

2.4.1.2 Flip-and-Shift Method [Example 2.2 (Oppenheim)]


The “echo method” of representation as in Example 2.1 is not very
convenient for signals with many non-zero samples, and it cannot be
used for continuous systems. An alternative method known as “flip-
and-shift method” can be consider by the graphical interpretation of
the convolution formula, not with the graphs plotted against the
independent variable n, but against the dummy variable, k. Recall that
the convolution sum is given by

y[n]   x[k ]h[n  k ]
k 

This infinite sum says that a single value of 𝑦[𝑛] may be found by
performing the sum of all the multiplications of 𝑥[k] and ℎ[𝑛 − k] at
every value of k.
2

1
11/18/2021

Here, sequence 𝑥[k] is already a function of k, but the sequence


ℎ[𝑛 − k] is a function of k with n fixed. In sketching the sequences
ℎ[𝑛−k], we used the fact that ℎ[𝑛−k] is a time reversed and shifted
version of the impulse response ℎ[k]. In particular, as k increases,
the argument 𝑛−k decreases, explaining the need to perform a time
reversal of ℎ[k]. The argument 𝑛−k will equal 0 at the value k = n.
Thus, if we sketch the signal ℎ[-k], we can obtain the signal ℎ[𝑛−k]
simply by shifting to the right by n (if n is positive) and to the left
(if n is negative).

The process of computing the convolution between 𝑥[k] and


ℎ[𝑛−k] involves the following steps:

1. Rename the independent variable of the arbitrary sequence


x[n] and h[n] to k.

2. Flip /fold / time reverse the signal h[k] to h[-k].

3. Shift the flipped signal by n and sets its sample at k = 0


“moves” to k = n.

4. Multiply x[k] and h[n-k] for same coordinates on the k axis.


The value obtained is the response at n i.e., value of y[n] at a
particular n chosen in step 3.

5. Sum the samples of the product to get y[n].

The total response referred to as the Convolution sum need not always be
found graphically. The formula can directly be applied if the input and the
impulse response are some mathematical functions. We will see this by a
example later.
4

2
11/18/2021

Here, x[n] = 0.5, 2; 0n1


h[n] = 1, 1, 1; 0  n  2
So, output range  [(0)+(0)]  n  [(1)+(2)]
0n3
Duration of convolved output being
[(2+3)-1] = 4 samples

Fig.2.9 Convolution using flip-and shift Method.


5

Example 2.4.1.2.A: Determine y[n] = x1[n]* x2[n]

Here, x[n] = -1, 1; 0n1


h[n] = -1, 1, 1; -1  n  1
So, output range  [(0)+(-1)]  n  [(1)+(1)]
 -1  n  2
Duration of convolved output being
[(2+3)-1] = 4 samples

Fig.2.10 Convolution
using flip-and shift
Method.

3
11/18/2021

Continued ….

Example 2.4.1.2.B: Determine output for input function and


system function given below:

Here, x[n] = 0, 1, 2, 3 4, 5, 6; 0n6


h[n] = - 0, 1, 2, 3 4; - 0n4
So, output range  [(0)+(0)]  n  [(6)+(4)]
 0  n  10
Duration of convolved output being [(7+5)-1] =
11 samples

4
11/18/2021

10

5
11/18/2021

11

12

6
11/18/2021

13

14

7
11/18/2021

15

16

8
11/18/2021

17

18

9
11/18/2021

19

20

10
11/18/2021

Example 2.4.1.2.C: Convolute 𝑥[𝑛] = 1 for 0 ≤ 𝑛 ≤ 4


h[𝑛] = 1 for −2 ≤ 𝑛 ≤ 2.

Solution: y[n]   x[k ]h[n  k ]
k  

The total response referred to as the Convolution sum need not


always be found graphically. The formula can directly be applied if
the input and the impulse response are some mathematical functions.

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

So, output range  [(0) + (-2)]  n  [(4)+(2)]


 -2  n  6

Duration of convolved output being [(5+5)-1] = 9 samples


21

 Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
y[n]   x[k ]h[n  k ] h[n] = 1, 1, 1, 1, 1; -2  n  2
k  

 ...  x[2]h[n  2]  x[1]h[n  1]  x[0]h[n  0]


 x[1]h[n  1]  x[2]h[n  2]  x[3]h[n  3]
 x[4]h[n  4]  ...

⇒ 𝑦[0] = ⋯ + 𝑥[−2] ℎ[(0) − (−2)] + 𝑥[−1] ℎ[(0) − (−1)] +𝑥[0] ℎ[(0) − (0)]
+ 𝑥[1] ℎ[(0) − (1)] +𝑥[2] ℎ[(0) − (2)] + 𝑥[3] ℎ[(0) − (3)]
+𝑥[4] ℎ[(0) − (4)] +⋯
⇒ 𝑦[0] = ⋯ + 𝑥[−2] ℎ[2] + 𝑥[−1] ℎ[1]+𝑥[0] ℎ[0]
+ 𝑥[1] ℎ[- 1] + 𝑥[2] ℎ[−2] + 𝑥[3] ℎ[−3]
[
+𝑥[4] ℎ[−4] +⋯
⇒ 𝑦[0] = ⋯ + (0)(1) + (0)(1) + (1)(1)
+ (1)(1) + (1)(1) + (1)(0)
+ (1)(0) +⋯
 𝑦[0] = 3
22

11
11/18/2021

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[-1] = ⋯ + 𝑥[−2] ℎ[(−1) − (−2)] + 𝑥[−1] ℎ[(−1) − (−1)]


+𝑥[0] ℎ[(−1) − (0)] + 𝑥[1] ℎ[(−1) − (1)]
+𝑥[2] ℎ[(−1) − (2)] + 𝑥[3] ℎ[(−1) − (3)]
+𝑥[4] ℎ[(−1) − (4)] +⋯

⇒ 𝑦[-1] = ⋯ + 𝑥[−2] ℎ[1] + 𝑥[−1] ℎ[0]+𝑥[0] ℎ[-1]


+ 𝑥[1] ℎ[-2] + 𝑥[2] ℎ[−3] + 𝑥[3] ℎ[−4]
+𝑥[4] ℎ[−5] +⋯

⇒ 𝑦[-1] = ⋯ + (0)(1) + (0)(1) + (1)(1) + (1)(1)


+ (1)(0) + (1)(0) + (1)(0) +⋯

 𝑦[-1] = 2
23

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[-2] = ⋯ + 𝑥[−2] ℎ[(−2) − (−2)] + 𝑥[−1] ℎ[(−2) − (−1)]


+𝑥[0] ℎ[(−2) − (0)] + 𝑥[1] ℎ[(−2) − (1)]
+𝑥[2] ℎ[(−2) − (2)] + 𝑥[3] ℎ[(−2) − (3)]
+𝑥[4] ℎ[(−2) − (4)] +⋯

⇒ 𝑦[-2] = ⋯ + 𝑥[−2] ℎ[0] + 𝑥[−1] ℎ[-1]+𝑥[0] ℎ[-2]


+ 𝑥[1] ℎ[-3] + 𝑥[2] ℎ[−4] + 𝑥[3] ℎ[−5]
+𝑥[4] ℎ[−6] +⋯

⇒ 𝑦[-2] = ⋯ + (0)(1) + (0)(1) + (1)(1) + (1)(0)


+ (1)(0) + (1)(0) + (1)(0) +⋯

 𝑦[-2] = 1
24

12
11/18/2021

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[-3] = ⋯ + 𝑥[−2] ℎ[(−3) − (−2)] + 𝑥[−1] ℎ[(−3) − (−1)]


+𝑥[0] ℎ[(−3) − (0)] + 𝑥[1] ℎ[(−3) − (1)]
+𝑥[2] ℎ[(−3) − (2)] + 𝑥[3] ℎ[(−3) − (3)]
+𝑥[4] ℎ[(−3) − (4)] +⋯

⇒ 𝑦[-3] = ⋯ + 𝑥[−2] ℎ[-1] + 𝑥[−1] ℎ[-2]+𝑥[0] ℎ[-3]


+ 𝑥[1] ℎ[-4] + 𝑥[2] ℎ[−5] + 𝑥[3] ℎ[−6]
+𝑥[4] ℎ[−7] +⋯

⇒ 𝑦[-3] = ⋯ + (0)(1) + (0)(1) + (1)(0) + (1)(0)


+ (1)(0) + (0)(0) + (0)(0) +⋯

 𝑦[-3] = 0 (Outside the limit)


25

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[1] = ⋯ + 𝑥[−2] ℎ[(1) − (−2)] + 𝑥[−1] ℎ[(1) − (−1)]


+𝑥[0] ℎ[(1) − (0)] + 𝑥[1] ℎ[(1) − (1)]
+𝑥[2] ℎ[(1) − (2)] + 𝑥[3] ℎ[(1) − (3)]
+𝑥[4] ℎ[(1) − (4)] +⋯

⇒ 𝑦[1] = ⋯ + 𝑥[−2] ℎ[3] + 𝑥[−1] ℎ[2]+𝑥[0] ℎ[1]


+ 𝑥[1] ℎ[0] + 𝑥[2] ℎ[−1] + 𝑥[3] ℎ[−2]
+𝑥[4] ℎ[−3] +⋯

⇒ 𝑦[1] = ⋯ + (0)(0) + (0)(1) + (1)(1) + (1)(1)


+ (1)(1) + (1)(1) + (1)(0) +⋯

 𝑦[1] = 4
26

13
11/18/2021

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[2] = ⋯ + 𝑥[−2] ℎ[(2) − (−2)] + 𝑥[−1] ℎ[(2) − (−1)]


+𝑥[0] ℎ[(2) − (0)] + 𝑥[1] ℎ[(2) − (1)]
+𝑥[2] ℎ[(2) − (2)] + 𝑥[3] ℎ[(2) − (3)]
+𝑥[4] ℎ[(2) − (4)] +⋯

⇒ 𝑦[2] = ⋯ + 𝑥[−2] ℎ[4] + 𝑥[−1] ℎ[3]+𝑥[0] ℎ[2]


+ 𝑥[1] ℎ[1] + 𝑥[2] ℎ[0] + 𝑥[3] ℎ[−1]
+𝑥[4] ℎ[−2] +⋯

⇒ 𝑦[2] = ⋯ + (0)(0) + (0)(0) + (1)(1) + (1)(1)


+ (1)(1) + (1)(1) + (1)(1) +⋯

 𝑦[2] = 5
27

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[3] = ⋯ + 𝑥[−2] ℎ[(3) − (−2)] + 𝑥[−1] ℎ[(3) − (−1)]


+𝑥[0] ℎ[(3) − (0)] + 𝑥[1] ℎ[(3) − (1)]
+𝑥[2] ℎ[(3) − (2)] + 𝑥[3] ℎ[(3) − (3)]
+𝑥[4] ℎ[(3) − (4)] +⋯

⇒ 𝑦[2] = ⋯ + 𝑥[−2] ℎ[5] + 𝑥[−1] ℎ[4]+𝑥[0] ℎ[3]


+ 𝑥[1] ℎ[2] + 𝑥[2] ℎ[1] + 𝑥[3] ℎ[0]
+𝑥[4] ℎ[−1] +⋯

⇒ 𝑦[2] = ⋯ + (0)(0) + (0)(0) + (1)(0) + (1)(1)


+ (1)(1) + (1)(1) + (1)(1) +⋯

 𝑦[2] = 4
28

14
11/18/2021

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[4] = ⋯ + 𝑥[−2] ℎ[(4) − (−2)] + 𝑥[−1] ℎ[(4) − (−1)]


+𝑥[0] ℎ[(4) − (0)] + 𝑥[1] ℎ[(4) − (1)]
+𝑥[2] ℎ[(4) − (2)] + 𝑥[3] ℎ[(4) − (3)]
+𝑥[4] ℎ[(4) − (4)] +⋯

⇒ 𝑦[4] = ⋯ + 𝑥[−2] ℎ[6] + 𝑥[−1] ℎ[5]+𝑥[0] ℎ[4]


+ 𝑥[1] ℎ[3] + 𝑥[2] ℎ[2] + 𝑥[3] ℎ[1]
+𝑥[4] ℎ[0] +⋯

⇒ 𝑦[4] = ⋯ + (0)(0) + (0)(0) + (1)(0) + (1)(0)


+ (1)(1) + (1)(1) + (1)(1) +⋯

 𝑦[4] = 3
29

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[5] = ⋯ + 𝑥[−2] ℎ[(5) − (−2)] + 𝑥[−1] ℎ[(5) − (−1)]


+𝑥[0] ℎ[(5) − (0)] + 𝑥[1] ℎ[(5) − (1)]
+𝑥[2] ℎ[(5) − (2)] + 𝑥[3] ℎ[(5) − (3)]
+𝑥[4] ℎ[(5) − (4)] +⋯

⇒ 𝑦[5] = ⋯ + 𝑥[−2] ℎ[7] + 𝑥[−1] ℎ[6]+𝑥[0] ℎ[5]


+ 𝑥[1] ℎ[4] + 𝑥[2] ℎ[3] + 𝑥[3] ℎ[2]
+𝑥[4] ℎ[1] +⋯

⇒ 𝑦[5] = ⋯ + (0)(0) + (0)(0) + (1)(0) + (1)(0)


+ (1)(0) + (1)(1) + (1)(1) +⋯

 𝑦[5] = 2
30

15
11/18/2021

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[6] = ⋯ + 𝑥[−2] ℎ[(6) − (−2)] + 𝑥[−1] ℎ[(6) − (−1)]


+𝑥[0] ℎ[(6) − (0)] + 𝑥[1] ℎ[(6) − (1)]
+𝑥[2] ℎ[(6) − (2)] + 𝑥[3] ℎ[(6) − (3)]
+𝑥[4] ℎ[(6) − (4)] +⋯

⇒ 𝑦[6] = ⋯ + 𝑥[−2] ℎ[8] + 𝑥[−1] ℎ[7]+𝑥[0] ℎ[6]


+ 𝑥[1] ℎ[5] + 𝑥[2] ℎ[4] + 𝑥[3] ℎ[3]
+𝑥[4] ℎ[2] +⋯

⇒ 𝑦[6] = ⋯ + (0)(0) + (0)(0) + (1)(0) + (1)(0)


+ (1)(0) + (1)(0) + (1)(1) +⋯

 𝑦[6] = 1
31

Here, x[n] = 1, 1, 1, 1, 1; 0  n  4
h[n] = 1, 1, 1, 1, 1; -2  n  2

⇒ 𝑦[7] = ⋯ + 𝑥[−2] ℎ[(7) − (−2)] + 𝑥[−1] ℎ[(7) − (−1)]


+𝑥[0] ℎ[(7) − (0)] + 𝑥[1] ℎ[(7) − (1)]
+𝑥[2] ℎ[(7) − (2)] + 𝑥[3] ℎ[(7) − (3)]
+𝑥[4] ℎ[(7) − (4)] +⋯

⇒ 𝑦[7] = ⋯ + 𝑥[−2] ℎ[9] + 𝑥[−1] ℎ[8]+𝑥[0] ℎ[7]


+ 𝑥[1] ℎ[6] + 𝑥[2] ℎ[5] + 𝑥[3] ℎ[4]
+𝑥[4] ℎ[3] +⋯

⇒ 𝑦[7] = ⋯ + (0)(0) + (0)(0) + (1)(0) + (1)(0)


+ (1)(0) + (1)(0) + (1)(1) +⋯

 𝑦[7] = 0 (Outside the limit)


32

16

You might also like