Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Two Examples On Linear and Circular Convolution of Signals.: Example 1

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

Ht 2019

Umeå University
Department of mathematics
and mathematical statistics
PAB

Two examples on linear and circular convolution of signals.

Example 1. Calculate the linear convolution of the two signals:


 


 2 n=0 

 1 n=0

−3 n = 1 
 7 n=1
x(n) = y(n) =


 1 n=2 

−2 n = 2

 0 otherwise 
 0 otherwise

Method 1. (probably the easiest) Use that the z-transform turns a convolution into a product.

Z {(x ∗ y)} (z) = X(z) · Y (z). Here we have X(z) = 2 · z 0 − 3 · z −1 + 1 · z −2 = 2 − 3z −1 + z −2


and Y (z) = 1 · z 0 + 7 · z −1 − 2 · z −2 = 1 + 7z −1 − 2z −2 . Taking their product we get
X(z) · Y (z) = 2 − 3z −1 + z −2 · 1 + 7z −1 − 2z −2 = 2 · 1 + 7z −1 − 2z −2 − 3z −1 · 1 + 7z −1 − 2z −2 +
   

+ z −2 · 1 + 7z −1 − 2z −2 = 2 + 14z −1 − 4z −2 − 3z −1 − 21z −2 + 6z −3 + z −2 + 7z −3 − 2z −4 =


= 2 + 11z −1 − 24z −2 + 13z −3 − 2z −4 and from this we can read off the result:



 2 n=0




 11 n=1

−24 n=2
(x ∗ y)(n) =


 13 n=3

 −2

 n=4


 0 otherwise


X
Method 2 Use the definition (x ∗ y)(n) = x(k)y(n − k). The convolution of two finite length
k=−∞
signals with lengths N1 and N2 will have length N = N1 + N2 − 1. So here the convolution will have
length N = 3 + 3 − 1 = 5 as can be seen from the result of method 1 also. Here we have that the
sum is only for k = 0, 1, 2 since otherwise x(k) = 0. So for n = 0, 1, 2, 3, 4 we get

n=0 (x ∗ y)(0) = x(0) · y(0 − 0) + x(1) · y(0 − 1) + x(2) · y(0 − 2) =


= x(0) · y(0) + x(1) · y(−1) + x(2) · y(−2) = 2 · 1 = 2
n=1 (x ∗ y)(1) = x(0) · y(1 − 0) + x(1) · y(1 − 1) + x(2) · y(1 − 2) =
= x(0) · y(1) + x(1) · y(0) + x(2) · y(−1) = 2 · 7 + (−3) · 1 = 14 − 3 = 11
n=2 (x ∗ y)(2) = x(0) · y(2 − 0) + x(1) · y(2 − 1) + x(2) · y(2 − 2) =
= x(0) · y(2) + x(1) · y(1) + x(2) · y(0) = 2 · (−2) + (−3) · 7 + 1 · 1 = −4 − 21 + 1 = −24
n=3 (x ∗ y)(3) = x(0) · y(3 − 0) + x(1) · y(3 − 1) + x(2) · y(3 − 2) =
= x(0) · y(3) + x(1) · y(2) + x(2) · y(1) = (−3) · (−2) + 1 · 7 = 6 + 7 = 13
n=3 (x ∗ y)(4) = x(0) · y(4 − 0) + x(1) · y(4 − 1) + x(2) · y(4 − 2) =
= x(0) · y(4) + x(1) · y(3) + x(2) · y(2) = 1 · (−2) = −2.

We get the same result as in method 1, (x ∗ y)(n) = [2, 11, −24, 13, −2].
Example 2. (This is a problem from the test 2020-01-17)
The two sequences x and y are given by, x(0) = 1, x(1) = 1, x(2) = 0, x(3) = 3
and y(0) = 2, y(1) = 3, y(2) = 1, y(3) = 1

a) Calculate the circular convolution x ~ y without using the discrete Fourier


transform, DFT.

b) Calculate the circular convolution x ~ y using the discrete Fourier transform.

Solutions

a) (This is the easiest method)


The circular convolution x ~ y is calculated using circulant matrix.
    
1 3 0 1 2 12
1 1 3 0 3  8 
x~y = 0 1
  =  
1 3 1  7 
3 0 1 1 1 8

b) The circular convolution z = x ~ y is now calculated using the discrete Fourier transform.
 
1 1 1 1
1 −j −1 j
We calculate the DFT as X = F4 · x, Y = F4 · y where the matrix F4 =  1 −1
.
1 −1
1 j −1 −j
         
1 1 1 1 1 5 1 1 1 1 2 7
1 −j −1 j 1 = 1 + 2j  Y = 1 −j −1 j 3 = 1 − 2j 
        
We get X =  1 −1 1 −1 0     −3  1 −1 1 −1 1     −1 
1 j −1 −j 3 1 − 2j 1 j −1 −j 1 1 + 2j
   
5·7 35
(1 + 2j) · (1 − 2j)  5 
The DFT of x ~ y = z then is Z =   (−3) · (−1)  =  3  . To get the convolution we
  

(1 − 2j) · (1 + 2j) 5
       
1 1 1 1 35 48 12
1 1 1 j −1 −j 1
 ·   =   =  8 .
5 32
multiply by the inversee z = F4−1 · Z = F4∗ · Z = 
       
4 4 1 −1
 1 −1   3  4 28
   7
1 −j −1 j 5 32 8

Answer: a) and b) z = x ~ y is z(0) = 12, z(1) = 8, z(2) = 7, z(3) = 8.

You might also like