P. 1
Convolution Examples

Convolution Examples

|Views: 1|Likes:
Published by Ahmed Alkhamisy

More info:

Published by: Ahmed Alkhamisy on Apr 20, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/30/2015

pdf

text

original

ENGR 012 – Slide 1

Examples of Convolution
There’s no need to fear There s no need to fear,
convolution is here!
Review
Impulse response: h(t)
= ∗ = ∗ y(t) h(t) x(t) x(t) h(t)
Impulse response: h(t)
Input: x(t)
Output: y(t)
+∞ +∞
−∞ −∞
= λ − λ λ = λ − λ λ
∫ ∫
y( ) ( ) ( ) ( ) ( )
h( )x(t )d x( )h(t )d
Given the impulse response of a system, and the input to the system,
we can find the output by using convolution.
ENGR 012 – Slide 2
System 1:
M ith lidi f i ti
Example Systems
Mass with sliding friction,
input=f
a
(t), output=v(t)
M=1, b=2;
0.6
0.8
1
γ
(
t
)
Step response of mass-friction system
0.6
0.8
1
y
δ
(
t
)
Impulse response of mass-friction system
-1 0 1 2 3
0
0.2
0.4
Time (seconds
y
γ
-1 0 1 2 3
0
0.2
0.4
Time (seconds
h
t
=
y
b
t
2t
M
1
1
h (t) e (t) e (t)
M


= γ = γ
Time (seconds
Step response of spring-friction system
( )
b
t
2t
M
1
1 1
y (t) 1 e (t) 1 e (t)
b 2


γ
⎛ ⎞
= − γ = − γ
⎜ ⎟
⎝ ⎠
I l f i f i ti t
System 2:
Spring and friction in parallel,
input=f
a
(t), output= v(t)
k=1, b=2
0.4
0.6
0.8
1
y
γ
(
t
)
Step response of spring friction system
0
0.5
1
)
=
y
δ
(
t
)
Impulse response of spring-friction system
k
0 2 4 6 8 10
0
0.2
Time (seconds
0 2 4 6 8 10
-1
-0.5
Time (seconds
h
(
t
)
k
t
b
2
t
2
1 1
h (t) (t) e (t)
k b
1
(t) e (t)
2


= δ − γ
= δ − γ
k
t t
b 2
2
1
y (t) e (t) e (t)
k


γ
= γ = γ
ENGR 012 – Slide 3
Example 1 / System 1
What is step response of h (t)? What is step response of h
1
(t)?
1 1 1
y(t) h (t) * x(t) h ( )x(t )d x( )h (t )d
+∞ +∞
−∞ −∞
= = λ − λ λ = λ − λ λ
∫ ∫
{ }
{ } { }
{ }
2 2(t )
y(t) e ( ) (t ) d (t) e (t ) d
+∞ +∞
− λ − −λ
−∞ −∞
= γ λ γ − λ λ = γ γ − λ λ
∫ ∫
Change lower limit of integration: γ(λ)=0, λ<0 Step response of mass-friction system g g γ( ) ,
2
0
y(t) e (t )d

+∞
− λ
= γ − λ λ

Change upper limit of integration:
0.4
0.6
0.8
1
y
γ
(
t
)
p p y
t
t
2 2
0
1
y(t) e d e
2
− λ − λ
= λ = −

Change upper limit of integration:
γ(t-λ)=0, t-λ<0; or γ(t-λ)=0, λ>t
-1 0 1 2 3
0
0.2
Time (seconds
( ) ( )
2t 2t
1 1
y(t) e 1 1 e , t 0
2 2
− −
= − − = − >
0
0
2

Note 2: this was a pointless exercise. We
Note 1: we get both the homogeneous and
the particular solution but can only solve
problems with zero initial conditions.
( )
2t
1
y(t) 1 e (t)
2

= − γ
(functional form)
p
used the impulse response to find the step
response – but we needed to use the step
response to find the impulse response in the
first place (previous slide). Soon we will be
able to find the impulse response directly.
ENGR 012 – Slide 4
Example 2 / System 1
What is ramp response of h
1
(t) (i e x(t)=tγ(t))?
{ }
( )
{ }
2 t
1
y(t) x( )h (t )d ( ) e (t ) d
+∞ +∞
− −λ
−∞ −∞
= λ − λ λ = λγ λ γ − λ λ
∫ ∫
t t t
What is ramp response of h
1
(t) (i.e., x(t)=tγ(t))?
( )
t t t
2 t
2t 2 2t 2
0 0 0
y(t) e d e e d e e d
− − −
− −λ
− λ − λ
= λ λ = λ λ = λ λ
∫ ∫ ∫
t
1 t 1 1
⎡ ⎤
⎛ ⎞
⎡ ⎤ λ ⎛ ⎞ ⎛ ⎞
( )
2t 2 2t 2t
2
0
1 t 1 1
y(t) e e e e
2 2 4 4
2

− λ −
⎡ ⎤
⎛ ⎞
⎡ ⎤ λ ⎛ ⎞ ⎛ ⎞
⎢ ⎥ ⎜ ⎟
= − = − − −
⎢ ⎥ ⎜ ⎟ ⎜ ⎟
⎜ ⎟ ⎢ ⎥
⎝ ⎠ ⎝ ⎠
⎣ ⎦
⎝ ⎠
⎣ ⎦
2 2
t 1 1 ⎡ ⎤
⎛ ⎞
Ramp response of mass-friction system
2t 2t
t 1 1
y(t) e e
2 4 4

⎡ ⎤
⎛ ⎞
= − +
⎢ ⎥ ⎜ ⎟
⎝ ⎠
⎣ ⎦
2t
t 1 1
y(t) e
2 4 4

= − +
3
4
Ramp response of mass friction system

input
output
( )
2t
2 4 4
1 1
t 1 e , t 0
2 2

⎛ ⎞
= − − >
⎜ ⎟
⎝ ⎠
or
1
2
y
r
a
m
p
(
t
)
2t
t 1 1
y(t) e (t)
2 4 4

⎛ ⎞
= − + γ
⎜ ⎟
⎝ ⎠
or
-1 0 1 2 3 4 5
0
Time (seconds

ENGR 012 – Slide 5
Example 3 / System 2
What is step response of h
2
(t)? What is step response of h
2
(t)?
2
y(t) x( )h (t )d
+∞
−∞
= λ − λ λ

( )
1
t
2
1
y(t) ( ) (t ) e (t ) d
2
+∞
− −λ
−∞
⎛ ⎞
= γ λ δ − λ − γ − λ λ
⎜ ⎟
⎝ ⎠

k +∞ +∞
( )
k
t
2
1
y(t) ( ) (t )d ( )e (t )d
2
+∞ +∞
− −λ
−∞ −∞
= γ λ δ − λ λ − γ λ γ − λ λ
∫ ∫
t 1 1 1 1
t t
2 2 2 2
1 1
y(t) (t) e ( )e (t )d (t) e e d
+∞
− λ − λ
γ γ λ γ λ λ γ λ
∫ ∫
sifting property
2 2 2 2
0
y(t) (t) e ( )e (t )d (t) e e d
2 2
−∞
= γ − γ λ γ − λ λ = γ − λ
∫ ∫
t
1 1 1 1
t t t
2 2 2 2
1
y(t) (t) 2 e e (t) e e 1
2
− λ − ⎛ ⎞
= γ − ⋅ ⋅ = γ − −
⎜ ⎟
⎝ ⎠
0
2
γ γ
⎜ ⎟
⎝ ⎠
1 1
t t
2 2
y(t) (t) 1 e e , t 0
− − ⎛ ⎞
= γ − − = >
⎜ ⎟
⎝ ⎠
0 4
0.6
0.8
1
y
γ
(
t
)
Step response of spring-friction system
⎝ ⎠
1
t
2
y(t) e (t)

= γ
0 2 4 6 8 10
0
0.2
0.4
Time (seconds
y
ENGR 012 – Slide 6
Example 4 / Graphical Convolution (1)
What is convolution of g(t)=0 5e
-t
γ(t) with f(t)=2(γ(t)- γ(t-3))? What is convolution of g(t)=0.5e γ(t) with f(t)=2(γ(t) γ(t 3))?
y(t) g(t) f(t) f( )g(t )d
+∞
−∞
= ∗ = λ − λ λ

We could do it mathematically, but it is useful to visualize the process.
2
f(t) vs t
2
f(
λ
) vs
λ
change of variable
from t to λ
y, p
1.5
2
2s(t) & 2s(t-3) vs t
(
t
-
3
)

-2 0 2 4 6
0
1
t ( d
f
(
t
)
-2 0 2 4 6
0
1
( d
f
(
λ
)
-2 0 2 4 6
0
0.5
1
t (seconds
2
γ
(
t
)

a
n
d

2
γ
(

2s(t)
2s(t-3)
t (seconds
λ
(seconds
2
g(
λ
) vs
λ
2
g(-
λ
) vs
λ
2
g(t-
λ
) vs
λ
, for t=1
time reversal
because of -λ
shift by t
-2 0 2 4 6
0
1
g
(
λ
)
-2 0 2 4 6
0
1
g
(
-
λ
)
-2 0 2 4 6
0
1
g
(
t
-
λ
)
-2 0 2 4 6
λ
(seconds
-2 0 2 4 6
λ
(seconds
-2 0 2 4 6
λ
(seconds
So the convolution process is: flip, shift (for each value of t), multiply, integrate (fsmi).
ENGR 012 – Slide 7
Example 4 / Graphical Convolution (2)
+∞
t
y(t) g(t) f(t) f( )g(t )d
g(t) 0.5e (t)
−∞

= ∗ = λ − λ λ
= γ

1.5
2
f(
λ
), g(t-
λ
), and their product vs
λ
, for t=-1

f(
λ
)
g(t-
λ
)
product
Because one of the inputs is
f(t) 2( (t) (t 3)) = γ − γ −
0.5
1
Because one of the inputs is
described piecewise, split
convolution integral into
pieces.
-2 -1 0 1 2 3 4 5 6
0
λ
(seconds

Consider, first, t<0 (Region 1). 2
y(t), t<0
Since the product is always 0,
the integral is zero.
1
1.5
y
(
t
)
fsmi
g
y(t) 0, t 0 = <
-2 -1 0 1 2 3 4 5 6
0
0.5
t (seconds
ENGR 012 – Slide 8
Example 4 / Graphical Convolution (3)
t
y(t) g(t) f(t) f( )g(t )d
g(t) 0.5e (t)
+∞
−∞

= ∗ = λ − λ λ
= γ

1 5
2
f(
λ
), g(t-
λ
), and their product vs
λ
, for t=1.5

f(
λ
)
g(t-
λ
)
product
Now consider 0<t<3 (Region 2)
f(t) 2( (t) (t 3)) = γ − γ −
0.5
1
1.5
product
Now consider 0<t<3 (Region 2).
∫ ∫
t t
-2 -1 0 1 2 3 4 5 6
0
λ
(seconds

fsmi
− −λ − λ
= ⋅ λ = λ
∫ ∫
(t ) t
0 0
y(t) 0.5 2e d e e d
− λ
= λ

t
t
y(t) e e d
− λ
=
t
t
e e
2
y(t), 0<t<3
t
(t) (1 ) 0 t 3
λ

0
y(t) e e d
0

= −
t t 0
y(t) e (e e )

= −
t t
e (e 1) 1
1.5
y
(
t
)

= − < <
t
y(t) (1 e ), 0 t 3
-2 -1 0 1 2 3 4 5 6
0
0.5
t (seconds
ENGR 012 – Slide 9
f(
λ
) g(t
λ
) and their product vs
λ
for t=4
Example 4 / Graphical Convolution (4)
1.5
2
f(
λ
), g(t-
λ
), and their product vs
λ
, for t=4

f(
λ
)
g(t-
λ
)
product
t
y(t) g(t) f(t) f( )g(t )d
g(t) e (t)
+∞
−∞

= ∗ = λ − λ λ
= γ

0.5
1
Now consider 3<t (Region 3).
f(t) 2( (t) (t 3)) = γ − γ −
y(t), 3<t
-2 -1 0 1 2 3 4 5 6
0
λ
(seconds

− −λ − λ
= ⋅ λ = λ
∫ ∫
3 3
(t ) t
0 0
y(t) 0.5 2e d e e d
fsmi
1.5
2
)
− λ
= λ

3
t
0
y(t) e e d
− λ
=
3
t
0
e e
t 3 0
(t) ( )
t 3
( 1)
0
0.5
1
y
(
t
)

= −
t 3 0
y(t) e (e e )

= −
t 3
e (e 1)
− −
= − <
3 t t
y(t) (e e ), 3 t
homogeneous
response decay
-2 -1 0 1 2 3 4 5 6
0
t (seconds
− − − − − −
= − = −
(t 3) t 3 (t 3)
y(t) (e e ) (1 e )e
Understanding of this form of equation is not crucial.
value at t=3 (delayed 3 sec)
ENGR 012 – Slide 10
Example 5 / Graphical Convolution (1)
What is y(t)=f(t)*g(t)
f(t)=2(γ(t)- γ(t-1))
1.5
2
2.5
f(t) vs t
g(t)=(γ(t)- γ(t-2))/2
3 2 1 0 1 2 3 4 5 6
-0.5
0
0.5
1
f
(
t
)
-3 -2 -1 0 1 2 3 4 5 6
t (seconds
2
2.5
g(t) vs t
0
0.5
1
1.5
g
(
t
)
-3 -2 -1 0 1 2 3 4 5 6
-0.5
t (seconds
This time we will need to split up the integral into five regions
ENGR 012 – Slide 11
Example 5 / Graphical Convolution (2)
f(
λ
), g(t-
λ
) and product for t=-.5, (Region 1)
f(
λ
)
t

Region 1: (t<0)
-3 -2 -1 0 1 2 3 4 5 6
0
1
2
λ
(seconds)
( ) g( ) p ( g )


f(
λ
)
g(t-
λ
)
f(
λ
)g(t-
λ
)
0
t
0
f(t) g(t) f( )g(t )d
0 0
∗ = λ − λ λ
= =


Region 2: (0<t<1)
λ
(seconds)
3 2 1 0 1 2 3 4 5 6
0
1
2
f(
λ
), g(t-
λ
) and product for t=0.25, (Region 2)
( )
t
0
t
0
f(t) g(t) f( )g(t )d
1
2 d t
2
∗ = λ − λ λ
⎛ ⎞
= λ =
⎜ ⎟
⎝ ⎠


Region 3: (1<t<2)
-3 -2 -1 0 1 2 3 4 5 6
λ
(seconds)
0
1
2
f(
λ
), g(t-
λ
) and product for t=1.33, (Region 3)
0
2
⎝ ⎠
( )
t
0
1
f(t) g(t) f( )g(t )d
1
∗ = λ − λ λ
⎛ ⎞


g ( )
-3 -2 -1 0 1 2 3 4 5 6
0
λ
(seconds)
2
f(
λ
), g(t-
λ
) and product for t=2.5, (Region 4)
( )
0
1
2 d 1
2
⎛ ⎞
= λ =
⎜ ⎟
⎝ ⎠

t
0
f(t) g(t) f( )g(t )d ∗ = λ − λ λ

Region 4: (2<t<3)
-3 -2 -1 0 1 2 3 4 5 6
0
1
λ
(seconds)
f(
λ
), g(t-
λ
) and product for t=5, (Region 4)
( )
0
1
t 2
1
2 d 3 t
2

⎛ ⎞
= λ = −
⎜ ⎟
⎝ ⎠

t

Region 5: (3<t)
-3 -2 -1 0 1 2 3 4 5 6
0
1
2
λ
(seconds)
0
t
0
f(t) g(t) f( )g(t )d
0 0
∗ = λ − λ λ
= =


ENGR 012 – Slide 12
Example 5 / Graphical Convolution (3)
f(t) vs t
1
2
f
(
t
)
f(t) vs t
-3 -2 -1 0 1 2 3 4 5 6
0
t (seconds)
g(t) vs t
1
2
g
(
t
)
-3 -2 -1 0 1 2 3 4 5 6
0
t
y(t)=f(t)*g(t)
0
1
2
y
(
t
)
-3 -2 -1 0 1 2 3 4 5 6
0
t (seconds)

i ti input=fa(t).2 0 0 2 4 6 Time (seconds 8 10 -1 γ δ I Impulse l response of f spring-friction i f i ti system t 1 0. b=2 Step response of spring-friction spring friction system 1 0.6 0.4 0.ENGR 012 – Slide 2 System 1: M Mass with ith sliding lidi f friction.8 0. b=2. Example Systems Step response of mass-friction system 1 0.2 0 -1 0 1 Time (seconds 2 3 0.4 0.8 ht=y y (t) δ y (t) 0.5 0 -0.5 0 2 4 6 Time (seconds 8 10 y γ2(t) = 1 e k k − t b γ(t) = e −t 2 γ(t) t 1 1 −k h2 (t) = δ(t) − e b γ(t) k b 1 −t = δ(t) − e 2 γ(t) 2 .6 0.6 0.2 0 -1 0 1 Time (seconds 2 3 b − t⎞ 1⎛ 1 M y γ1(t) = ⎜1 − e ⎟ γ(t) = 1 − e−2t γ(t) b⎝ 2 ⎠ γ ( ) b t 1 −M h1(t) = e γ(t) = e−2t γ(t) M h(t) )=y (t) y (t) System 2: Spring and friction in parallel. input=fa(t). output= v(t) k=1.4 0.8 Impulse response of mass-friction system 1 0. output=v(t) M=1.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->