Professional Documents
Culture Documents
Convolution Properties: B (N) B (N) A (N)
Convolution Properties: B (N) B (N) A (N)
• Commutative property
a[n] b[n] = b[n] a[n]
• Associative property
(a[n] b[n]) c[n] = a[n] (b[n] c[n])
• Distributive property
(a[n] b[n])+(a[n] c[n]) = a[n] (b[n]+ c[n])
1 1
Convolution – cascade, parallel connection
• Cascade connection Useful when we have many sub-systems in a
system and we want to determine the final
set of impulse responses for the system
• Parallel connection
2
Convolution – cascade, parallel connection
• Example
• Simplifying
3
Convolution example (continuous)
4
Convolution example (continuous)
Stage 1 t < 0 and h(t-) does not overlap x() (Fig 4(d))
As the functions do not overlap x()h(t-) = 0 and there is no contribution to the
convolution integral
Stage 2 0 < t 2 and partial overlap occurs between h(t-) and x() (Fig 4 (e))
Over this range:
=t =t
y(t) = x( )h(t − )d = 3 2d
=0 =0
y(t) = 6 0 = 6t
t
for 0 t 2
Note that the integration is with respect to and not t. In this integration t behaves like a
constant and can be taken outside the integral sign
5
Convolution example (continuous)
Stage 3 2 t 3 and there is complete overlap of h(t-) and x() (Fig 4 (f, g))
Over this range of t:
y(t) = x( )h(t − )d = 3 2d
=t =t
= t−2 = t−2
=3 =3
y(t) = x( )h(t − )d = 3 2d
= t−2 = t−2
0 < t 2 y(t) = 6t
2 t 3 y(t) = 12
3 t 5 y(t) = 30 – 6t
Output length for continuous case = input length + impulse response length
7
Convolution Examples
MATLAB example
- convolution useful in filtering
1 1
0.8 0.8
0.6 0.6
0.4 0.4
i=1:1000; 0.2
0
0.2
plot(x1) -0.4
-0.6
-0.4
-0.6
plot(x2)
-1 -1
0 100 200 300 400 500 600 700 800 900 1000 0 100 200 300 400 500 600 700 800 900 1000
y=x1+x2; 2
plot(y) 1.5
h=[1 1];
1
0.5
z=conv(h,y); 0
freqz(h)
-1
-1.5
-2
0 100 200 300 400 500 600 700 800 900 1000
20
Magnitude (dB)
-20 3
-40
2
-60
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample) 1
0
0
Phase (degrees)
-50 -1
-2
-100
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Normalized Frequency ( rad/sample)
-3
0 200 400 600 800 1000 1200
8
Convolution Examples
MATLAB examples
i=1:1000;
h= [0,4,-2,3]
x = [0,1,0,2,1] x1=sin(2*pi*(5/1000)*i);
y=conv(x,h) x2=sin(2*pi*(400/1000)*i);
i=1:1000; y=x1+x2;
x=sin(2*pi*(5/1000)*i);
h=[1 0 0 0 0 0 0 1]
h=[1 -1]
z=conv(y,h);
freqz(h)
plot(z)
z=conv(x,h);
h=[1 0 0 0 1 0 0 1]
plot(z)
z=conv(y,h);
hold on
plot(z)
plot(x, 'r') 9
End effects on finite signals
• In convolution, as one signal is shifted the waveforms no
longer overlap completely
• First few and last few samples in convolution calculations are
based on less information than the data points in between
• Analogous to stabilisation time in analogue circuits – switch
on and off, for example
• See below - an example when convolution is used for filtering
• More on this when we study filtering
1
Amplitude (arbitrary units)
15
0.5
0 10
-0.5
-1
0 200 400 600 800 1000 1200
LPF 5
Sampling points 0
1
Amplitude (arbitrary units)
-5
0.5
0 -10
-0.5
-15
-1 0 200 400 600 800 1000 1200
0 200 400 600 800 1000 1200
Sampling points
10
Summary of topics covered
• Impulse response
• Convolution summation (discrete)
• Convolution integral (continuous)
• Examples of discrete and continuous
calculations
• Properties of convolution
• MATLAB examples
11