Biosignal Processing
BME-311
Convolution
Instructor: Engr. Farhan Yousaf
Convolution
• Convolution is a mathematical operation on two functions.
• Convolution is used in digital signal processing to study and design
linear time-invariant (LTI) systems such as digital filters. The output
signal, y[n], in LTI systems is the convolution of the input signal, x[n]
and impulse response h[n] of the system.
Convolution Integral
• Convolution integral is defined mathematically as:
Properties of Convolution
• Convolution has three basic properties
• Commutative
• Associative
• Distributive
Commutive property of Convolution
Associative
Distributive
Convolution in 1-D
Convolution in 1-D
Convolution in 2-D
Graphical Method of Convolution
• Steps
• 1) Folding: Reverse one signal to get h(-k)
• 2) Shifting: Shift right above the signal to get h(1-k)
• 3) Multiplication (Dot Product): Multiply shifted signal with x(k)
• 4) Summation: Sum all the values obtained by dot product
• 5) Repeat steps 2 to 4 to get y(n) for all values of n
Example #1
• Consider the LTI System with the input and impulse response as given
below. Calculate the output response for the given input.
• x(n) = [2 1 -1 0 -3]
• h(n) = [1 2 -1]
Step 1 (Fold or Mirror)
Step 2 (Shift)
• When k = 0, shift by 0, to get y(0)
y(o) = -1x0 + 2x2 + 1x1 + 0x-1 + 0x-3
y(0) = 0 + 4 + 1+ 0 + 0 = 5
Shift by -1 to to get y(-1)
Shift by -2 to get y(2)
Shift by 1 to get y(1)
Shift by 2 to get y(2)
Shift by 3 to get y(3)
Shift by 4 to get y(4)
Shift by 5 to get y(5)
Shift by 6 to get y(6)
Example # 1
• x(n) = [2 1 -1 0 -3] h(n) = [1 2 -1]
• y(n) = [2 5 -1 -3 -2 -6 3]
Tabular form
• Using previous example, list out values of k, x(k), h(k)