Vous êtes sur la page 1sur 20

Convolution


 x[n] and h[n] are two different sequences
 Sequence y[n] is generated by the convolution sum
 Convolution of x[n] and h[n] can be written is either

𝑦𝑛 = 𝑥 𝑘 ℎ[𝑛 − 𝑘]
𝑘=−∞

or

𝑦𝑛 = ℎ 𝑘 𝑥[𝑛 − 𝑘]
𝑘=−∞
Convolution

 There are 4 operations in the convolution:


 Folding
 Delay
 Multiplication
 Summation

 Important :
Differentiate between sequence (k) and delay (n)
Convolution
 Standard notation :

 Convolution steps :
1. Rewrite x[n] and h[n] as x[k] and h[k]
2. Fold h[k] to obtain h[-k]
3. Multiply x[n] with h[n-k]
4. Sum the result
5. Delay h[n-k] by one sample to the right and repeat 3
and 4
6. Repeat until there is no overlap of sequence
Convolution
 Example : Find y[n] when the input signal is x[n] and
its impulse response is h[n]

x[n] = [0, 1, 2, 1]

h[n] = [1, 1, 2, 2]
Convolution
Step 1 : Rewrite x[n] and h[n] as x[k] and h[k]
Convolution
Step 2 : Fold h[k] to obtain h[-k]
Convolution
Step 3 : Multiply x[n] with h[n-k]

k -1 0 1 2 3 4 5 6
x[k] 0 0 1 2 1 0 0 0
h[-k] 2 2 1 1 0 0 0 0
n=0 2 2 1 1 0 0 0 0 y[0] = 0 0 1 2 0 0 0
Convolution
Step 4 : Summation

k -1 0 1 2 3 4 5 6
x[k] 0 0 1 2 1 0 0 0
h[-k] 2 2 1 1 0 0 0 0
n=0 2 2 1 1 0 0 0 0 y[0] = 0 + 0 + 1 + 2
+0 +0+0+0=3
Convolution
Step 5 : Delay h[n-k] by ONE sample to the right and repeat 3 and 4

k -1 0 1 2 3 4 5 6
x[k] 0 0 1 2 1 0 0 0
h[-k] 2 2 1 1 0 0 0 0
n=0 2 2 1 1 0 0 0 0 y[0] = 0 + 0 + 1 + 2
+0 +0+0+0=3
n=1 0 2 2 1 1 0 0 0
Convolution
Step 5 : Delay h[n-k] by ONE sample to the right and repeat 3 and 4

k -1 0 1 2 3 4 5 6
x[k] 0 0 1 2 1 0 0 0
h[-k] 2 2 1 1 0 0 0 0
n=0 2 2 1 1 0 0 0 0 y[0]=0+0 +1+2+0 =3
n=1 0 2 2 1 1 0 0 0 y[1]= 0+0+2+2+1=5
Convolution
Step 6: Repeat until there is no overlap of sequence

k -1 0 1 2 3 4 5 6
x[k] 0 0 1 2 1 0 0 0
h[-k] 2 2 1 1 0 0 0 0
n=0 2 2 1 1 0 0 0 0 y[0]=0+0 +1+2+0 =3
n=1 0 2 2 1 1 0 0 0 y[1]= 0+0+2+2+1=5
: : : : : : : : : :
n=5 0 0 0 0 0 2 2 1 y[5] = 0
Convolution
Now observe result of folding :

h[-k] is a two-sided sequence


Convolution
Now observe result of folding :

h[-k] needs to be moved to the LEFT until the most right sample
overlaps x[k] most left sample
Convolution
Now observe result of folding :

k -3 -2 -1 0 1 2 3 4 5 6
x[k] 0 0 0 0 1 2 1 0 0 0
h[-k] 0 0 2 2 1 1 0 0 0 0
n = -1 0 2 2 1 1 0 0 0 0 0 y[-1] = 1
Convolution
Now observe result of folding :

k -3 -2 -1 0 1 2 3 4 5 6
x[k] 0 0 0 0 1 2 1 0 0 0
h[-k] 0 0 2 2 1 1 0 0 0 0
n = -1 0 2 2 1 1 0 0 0 0 0 y[-1] = 1
n = -2 2 2 1 1 0 0 0 0 0 0 y[-2] = 0
Convolution
Final result :
Correlation

 x[n] and y[n] are two sequences. The similarity
between them are measured using cross correlation

𝑟𝑦𝑥 𝑙 = 𝑦 𝑛 𝑥[𝑛 − 𝑙]
𝑛=−∞

 Autocorrelation is given by
∞ ∞

𝑟𝑥𝑥 𝑙 = 𝑥 𝑛 𝑥[𝑛 − 𝑙] or 𝑟𝑦𝑦 𝑙 = 𝑦 𝑛 𝑦[𝑛 − 𝑙]


𝑛=−∞ 𝑛=−∞
Correlation

 The process of correlation is similar to convolution,
except for the folding step:
 Folding
 Delay
 Multiplication
 Summation

 Important :
Differentiate between sequence (l) and delay (n)
Conclusion

Vous aimerez peut-être aussi