Convolution - University of Kufa

advertisement
Republic of Iraq
Ministry of Higher Education
& Scientific Research
University of Kufa
Collage of Engineering/ Department of
Electrical Engineering
Convolution
A Lecture
Submitted to the Development of Teaching and
Academic Training Center
By
Nora Hussam Sultan
2013/2014
D.S.P.
Convolution
1
Lecture Organization
1. Concept of convolution
2. Convolution Properties
3. Performing Convolutions
Aims of the lecture:
1. The student or learner should be able to describing the convolution.
2. The learner should be able to prove the convolution properties.
3. The learner should be able to apply the convolution on signals.
4. The learner should be able to find the best method to find the
convolution for signals.
D.S.P.
Convolution
2
Concept of convolution
The relationship between the input to a linear shift-invariant system,
x(n), and the output, y(n), is given by the convolution sum:
ஶ
‫ݕ‬ሺ݊ሻ = ‫ݔ‬ሺ݊ሻ ∗ ℎሺ݊ሻ = ෍ ‫ݔ‬ሺ‫ܭ‬ሻℎሺ݊ − ‫ܭ‬ሻ
௞ୀିஶ
It includes integration of the product of the first function with a shifted and
reflected version of the second function:
ஶ
‫ݕ‬ሺ‫ݐ‬ሻ = ‫ݔ‬ሺ‫ݐ‬ሻ ∗ ℎሺ‫ݐ‬ሻ = න ‫ݔ‬ሺߣሻℎሺ‫ ݐ‬− ߣሻ݀ߣ
ିஶ
Convolution Properties
Convolution is a linear operator and, therefore, has a number of
important properties including the commutative, associative, and
distributive properties. The definitions and interpretations of these
properties are summarized below.
•
Commutative Property
The commutative property states that the order in which two
sequences
are
convolved
is
not
important.
Mathematically,
the
commutative property is
‫ݔ‬ሺ݊ሻ ∗ ℎሺ݊ሻ = ℎሺ݊ሻ ∗ ‫ݔ‬ሺ݊ሻ
From a systems point of view, this property states that a system with
a unit sample response h(n) and input x(n) behaves in exactly the same way
as a system with unit sample response x(n) and an input h(n). This is
illustrated in Figure 1(a).
D.S.P.
•
Convolution
3
Associative Property
The convolution operator satisfies the associative property, which is
ሼ‫ݔ‬ሺ݊ሻ ∗ ℎଵ ሺ݊ሻሽ ∗ ℎଶ ሺ݊ሻ = ‫ݔ‬ሺ݊ሻ ∗ ሼℎଵ ሺ݊ሻ ∗ ℎଶ ሺ݊ሻሽ
From systems point of view, the associative property states that if
two systems with unit sample responses ℎଵ ሺ݊ሻand ℎଶ ሺ݊ሻare connected in
cascade as shown in Figure 1(b), an equivalent system is one that has a unit
sample response equal to the convolution of ℎଵ ሺ݊ሻand ℎଶ ሺ݊ሻ:
ℎ௘௤ = ℎଵ ሺ݊ሻ ∗ ℎଶ ሺ݊ሻ
Figure (1): The interpretation of convolution properties from a systems point
of view.
D.S.P.
•
Convolution
4
Distributive Property
The distributive property of the convolution operator states that
‫ݔ‬ሺ݊ሻ ∗ ሼℎଵ ሺ݊ሻ + ℎଶ ሺ݊ሻሽ = ‫ݔ‬ሺ݊ሻ ∗ ℎଵ ሺ݊ሻ + ‫ݔ‬ሺ݊ሻ ∗ ℎଶ ሺ݊ሻ
From a systems point of view, this property asserts that if two
systems with unit sample responses ℎଵ ሺ݊ሻ and ℎଶ ሺ݊ሻare connected in
parallel, as shown in Figure 1(c), an equivalent system is one that has a unit
sample response equal to the sum of ℎଵ ሺ݊ሻand ℎଶ ሺ݊ሻ:
ℎ௘௤ = ℎଵ ሺ݊ሻ ∗ ℎଶ ሺ݊ሻ
Performing Convolutions
There are several different approaches that may be used, and the one
that is the easiest will depend upon the form and type of sequences that are
to be convolved.
• Graphical Approach
The steps involved in using the graphical approach are as follows:
Plot both sequences, x(k) and h(k), as functions of k.
Choose one of the sequences, say h(k), and time-reverse it to
form the sequence h(-k).
Shift the time-reversed sequence by n. [Note: If n > 0, this
corresponds to a shift to the right (delay), whereas if n < 0, this
corresponds to a shift to the left]
Multiply the two sequences x(k) and h(n - k) and sum the
product for all values of k. The resulting value will be equal to
y(n). This process is repeated for all possible shifts, n.
D.S.P.
Convolution
5
Example1To illustrate the graphical approach to convolution, let evaluate
y(n) = x(n)*h(n) where x(n) and h(n) are the sequences shown in Figure 2
(a) and (b), respectively.To perform this convolution, we follow the steps
listed above :
1. Because x(k) and h(k) are both plotted as a function of k in Figure 2
(a) and (b), we next choose one of the sequences to reverse in time.
In this example, we time-reverse h(k), which is shown in Figure 2
(c).
2. Forming the product, x(k)h(-k), and summing over k, we find that
y(0) = 1.
3. Shifting h(k) to the right by one results in the sequence h(l - k )
shown in Figure 2(d). Forming the product, x(k)h(l - k), and
summing over k, we find that y(1) = 3.
4. Shifting h(l - k) to the right again gives the sequence h(2 - k) shown
in Figure 2(e). Forming the product, x(k)h(2 - k), and summing over
k, we find that y(2) = 6.
5. Continuing in this manner, we find that y(3) = 5. y(4) = 3, and y(n) =
0 for n > 4.
6. We next take h(-k) and shift it to the left by one as shown in Figure 2
(f ). Because the product, x(k)h(- 1 - k), is equal to zero for all k, we
find that y(- 1 ) = 0. In fact, y(n) = 0 for all n < 0.
Figure 2 (g) shows the convolution for all n.
D.S.P.
Convolution
6
Figure 2: The graphical approach to convolution.
A useful fact to remember in performing the convolution of two finite
length sequences is that if x(n) is of length L1 and h(n) is of length L2, y(n)
= x(n) * h(n) will be of length:
L = L1 + L2 – 1
D.S.P.
Convolution
7
• Slide Rule Method
Another method for performing convolutions, which we call the slide
rule method, is particularly convenient when both x(n) and h(n) are finite
in length and short in duration. The steps involved in the slide rule method
are as follows:
1. Write the values of x(k) along the top of a piece of paper, and the
values of h(-k) along the top of another piece of paper as illustrated
in Figure 3.
2. Line up the two sequence values x(0) and h(0), multiply each pair of
numbers, and add the products to form the value of y(0).
3. Slide the paper with the time-reversed sequence h(k) to the right by
one, multiply each pair of numbers, sum the products to find the
value y ( l ) , and repeat for all shifts to the right by n > 0. Do the
same, shifting the time-reversed sequence to the left, to find the
values of y(n) for n
0.
Figure 3: The slide rule approach to convolution.
Example 2: Solve example 1 using slide rule method.
From example 1 :
x(n)= [1 1 1]
for 1≤ n≤3
y(n)= [1 2 3]
for -1≤ n≤1
the begging point of y(n) is 1+(-1)=0, while the end point of y(n) is 3+1=4
D.S.P.
Convolution
8
the length of y(n) is length(x(n))+ length (h(n))-1=5
y(0)
y(1)
1
1
y(2) y(3) y(4)
1
Step (1): 3
2
1
Step (2):
3
2
1
3
2
1
3
2
1
3
2
Step (3):
Step (4):
Step (5):
1
From step (1), y(0)=1X1=1
From step (2), y(1)=(1 X2+1 X1)=3
From step (3), y(2)=(3X1+2 X1+1 X1)=6
From step (4), y(3)=(3X1+2 X1)=5
From step (5), y(4)=(3X1)=3
Figure 5 shows y(n) and this illustrate the same output using graphical
method.
D.S.P.
Convolution
9
H.W:
Q. Evaluate y(n) = x(t) * h(t), where x(t) and h(t) are as shown in Fig. 6.
1. Using graphical method.
2. Using slide rule method.
3. Simulation using matlab program.
ஶ
Q. Solve the above problem as ‫ݕ‬ሺ‫ݐ‬ሻ = ℎሺ‫ݐ‬ሻ ∗ ‫ݔ‬ሺ‫ݐ‬ሻ = ‫ି׬‬ஶ ℎሺߣሻ‫ݔ‬ሺ‫ ݐ‬− ߣሻ݀ߣ
. You should get the same answer, since convolution is commutative.
References
1) Monson H. Hayes, " Schaum's Outline of Theory and Problems of
Digital Signal Processing",1999.
2) Zahir M. Hussain, "Digital Signal Processing", RMIT University,
School of Electrical and Computer Engineering, 2002.
Download