Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1/23
Ch. 2 Convolution
C-T System Model Convolution Integral D-T System Model Convolution Sum
y[n] =
i =
x[i]h[n i]
This is needed for understanding how: (1) To analyze systems (2) To implement systems
Two cases, depending on form of x[n]: 1. x[n] is known analytically 2. x[n] is known numerically or graphically Analytical Convolution (used for by-hand analysis): Pretty straightforward conceptually: - put functions into convolution summation - exploit math properties to evaluate/simplify
3/23
Example:
x[ n] = a nu[n]
a nu[n]
n
h[n] = b n u[n]
b u[n]
y[n] = ?
y[n] =
i =
x[i]h[n i]
a i u[i ]b( n i )u[n i ]
Now use:
i =
= a i b ( n i )u[n i ]
i =0
Now use:
n
a = a i b ( n i ) = b n i =0 i =0 b
4/23
a y[ n ] = b i =0 b
n n
If a = b you are adding (n + 1) 1s and that gives n + 1 If a b, then a standard math relationship gives: Geometric Sum N 1 1 rN i r = 1 r , r 1 i =0 Know This!!!
n + 1, a = b a n +1 y[ n ] = 1 b , a b a 1 b
5/23
y[ n ] =
i =
6/23
i]
Commutativity says we can flip either x[i] or h[i] and get the same answer
Step 2: Flip h[i] to get h[-i] (The book calls this fold) Repeat for each n Step 3: For each output index n value of interest, shift by n to get h[n - i] (Note: positive n gives right shift!!!!) Step 4: Form product x[i]h[n i] and sum its elements to get the number y[n]
7/23
h[n]
3
...
-2 -1 1 2 3 4 5 6 7
... n
Solution For this problem I choose to flip x[n] My personal preference is to flip the shorter signal although I sometimes dont follow that rule only through lots of practice can you learn how to best choose which one to flip.
8/23
...
-2 -1 2 1 -2 -1 1 2 3 4 5 6 7
... i
x[i] ...
1 2 3 4 5
...
Commutativity says we can flip either x[i] or h[i] and get the same answer Here I flipped x[i]
...
-2 -1 1 2 3 4 5 6 7
... i
x[-i] ...
-2 -1 2 1 1 2 3 4 5 6 7
... i
9/23
We want a solution for n = -2, -1, 0, 1, 2, so must do Steps 3&4 for all n. But lets first do: Steps 3&4 for n = 0 and then proceed from there. Step 3: For n = 0, shift by n to get x[n - i] h[i]
3
...
-2 -1 1 2 3 4 5 6 7
... i
Step 4: For n = 0, Form the product x[i]h[n i] and sum its elements to give y[n]
2 3
h[i]x[0 - i] ...
...
-3 -2 -1 1 2 3 4 5 6 7
Sum over i
i
y[0] = 6
10/23
Steps 3&4 for all n < 0 Step 3: For n < 0, shift by n to get x[n - i] h[i]
3
...
-2 -1 1 2 3 4 5 6 7
... i
Shown here for n = -1
... i
1 2 3 4 5 6 7
Step 4: For n < 0, Form the product x[i]h[n i] and sum its elements to give y[n] h[i]x[-1 - i] = 0 ...
-3 -2 -1 1 2 3 4 5 6 7
...
0, n < 0 y[ n ] = 6, n = 0
y[n]
6
...
-2 -1 1 2 3 4 5 6 7
y[n] = ???
12/23
...
-2 -1 2 1 -2 -1 1 2 3 4 5 6 7 1 2 3 4 5 6 7
Step 4: For n = 1, Form the product x[i]h[n i] and sum its elements to give y[n]
x[1 - i] h[i]
23
...
-2 -1 1 2 3 4 5 6 7
13/23
...
-2 -1 2 1 -2 -1 1 2 3 4 5 6 7 1 2 3 4 5 6 7
Step 4: For n = 2, Form the product x[i]h[n i] and sum its elements to give y[n]
x[1 - i] h[i]
...
23 13 -2 -1 1 2 3 4 5 6 7
...
-2 -1 2 1 -2 -1 1 2 3 4 5 6 7 1 2 3 4 5 6 7
Step 4: For n = 3, Form the product x[i]h[n i] and sum its elements to give y[n]
x[1 - i] h[i]
...
23 13 -2 -1 1 2 3 4 5 6 7
...
-2 -1 2 1 1 2 3 4 5 6 7 1 2 3 4 5 6 7
Step 4: For n = 4, Form the product x[i]h[n i] and sum its elements to give y[n]
x[1 - i] h[i]
23 . 13 . -2 -1 1 2 3 4 5 6 7
...
-2 -1 2 1 1 2 3 4 5 6 7 1 2 3 4 5 6 7
... i
Step 4: For n = 5, Form the product x[i]h[n i] and sum its elements to give y[n]
x[1 - i] h[i]
...
23 13 -2 -1 1 2 3 4 5 6 7
...
-2 -1 2 1 1 2 3 4 5 6 7 1 2 3 4 5 6 7
... i
Step 4: For n = 6, Form the product x[i]h[n i] and sum its elements to give y[n]
x[1 - i] h[i]
...
23 13 -2 -1 1 2 3 4 5 6 7
Steps 3&4 for all n > 6 Step 3: For n > 6, shift by n to get x[n - i] h[i]
3
...
-2 -1 2 1 1 2 3 4 5 6 7 1 2 3 4 5 6 7
... i
Step 4: For n > 6, Form the product x[i]h[n i] and sum its elements to give y[n]
x[1 - i] h[i] = 0
...
23 13 -2 -1 1 2 3 4 5 6 7
So now we know the values of y[n] for all values of n We just need to put it all together as a function Here it is easiest to just plot it
y[n]
15 12 9 6 3 -2 -1 1 2 3 4 5 6 7
...
Note that convolving these kinds of signals gives a ramp-up at the beginning and a ramp-down at the end. Various kinds of transients at the beginning and end of a convolution are common.
20/23
BIG PICTURE: So what we have just done is found the zero-state output of a system having an impulse response given by this h[n] when the input is given by this x[n]:
x[n ]
2 .1
h[n ]
h[n]
x[n] ...
1 2 3 4 3
y[n]
..
... ...
-2 -1
...
-2 -1
-2 -1
1 2 3 4 5 6 7
1 2 3 4 5 6
21/23
Implementation Issues
Consider a D-T system with impulse response h[n] that has finite duration Could Build a digital hardware system or a software program for D-T convolution like this:
Clock
x(t) x[1] clock ADC h[0] x[0] h[1] 0 h[2] ... ... 0 h[i-1]
Storage Registers
...
Note that the normal order of sampled signals coming into the shift registers follows the flipped version of the signal.
Convolution Properties
These are things you can exploit to make it easier to solve problems 1.Commutativity
You can choose which signal to flip 2. Associativity x[n] (v[n] w[n]) = ( x[n] v[n]) w[n] Can change order sometimes one order is easier than another 3. Distributivity
may be easier to split complicated system h[n] into sum of simple ones OR.. we can split complicated input into sum of simple ones (nothing more than linearity) 4. Convolution with impulses
x[n] [ n q] = x[n q ]
This one is VERY easy to see using the graphical convolution steps. TRY IT!!
23/23
24/23