Vous êtes sur la page 1sur 81

Signals and Networks

Discussion#4

Tarun Choubisa
Dept of ETC,
KIIT University

19 January 2011 1
Resources
• O&W
• Ch. 2, Sect. 1-8 in Linear Signals & Systems, 2nd Ed. by Lathi
• http://www.jhu.edu/signals/
• http://www.isip.piconepress.com/projects/speech/software/demonstrations/applets/util/convolution/v6.0/
• http://www.see.ed.ac.uk/~mjj/dspDemos/EE4/tutConv.html
• http://www.see.ed.ac.uk/~mjj/dspDemos/EE4/tutConvDisc.html
• http://dsp.feit.ukim.edu.mk/demos/Konvolucija.html
• http://dsp.feit.ukim.edu.mk/demos/analogconv/Analog%20Convolution.html
• http://users.ece.gatech.edu/~bonnie/book/OnlineDemos/CTConv/
Convolution
• Definition: It is the tool or operation to determine the
response of the LTI system (h(n-k) is the output for
shifted impulse and x(k) is the coefficient. )
• Convolution between two DT signals x(n) and h(n) is
expressed as

Put n-k=m where m is a


Dummy variable.

Example: x(n) is input , h(n) = [ 1 0.8 0.4 0.01]


• x(n)= { 1 3 2 1 2 2 1 1 3 2} y(n)
Convolution, time-invariance and linearity
Response of at time is h[n].

[n] Y[n]=h[n]* [n]


LTI =h[n]
h[n]

By time invariance
Response of m at time n is h[n-m].

[n m] System
h[n m] time-invariance

n n
Convolution, time-invariance and linearity
Convolution, time-invariance and linearity

convolution is linear and shift/time invariant


Linear time-invariant systems (LTI)
• A sequence can be represented as a linear
combination of delayed impulses:
x[n] x[k ] [n k ]
k
• Let hk[n] be the response to [n-k] (an impulse at n = k)

y[n] T x[n]

T x[k ] [n k ]
k

If the system is linear


y[n] x[k ] T [n k ]

x[k ] hk [n]
k
If the system is time-invariant
x[k ] h[n k ]
k
Convolution sum
y[n] x[k ] h[n k ]
k
y[ n] x[ k ]hk [ n]
k

y[n] x[n] h[n] Convolution sum or


superposition sum
• Linear Time-Invariant(LTI) systems can be
described by the convolution sum!

x[n] x[k ] [n k ]

y[n] x[k ] h[n k ]


System Representation: Impulse Response
• Example: The discrete-time impulse response
1 n 0,1
h[n]
0 otherwise
Is completely described by the following LTI
y[n] x[n] x[n 1]
• However, the following systems also have the
same impulse response
y[n] ( x[n] x[ n 1]) 2
y[n] max( x[n], x[n 1])
• Therefore, if the system is non-linear, it is not
completely characterised by the impulse
response
Computing DT Convolution
Convolution: Graphical Method
Steps :
1) Reverse/flip one of the signal to get h[-k]
2) Shift right above signal by n to get h[-(k-n)]=h[n-k]
3) Multiply (dot product) h[n-k] with x[k] and sum up
to get sample y[n]
4) Repeat step 2 and 3 for different values of n to get
sample y[n]
Convolution: Graphical Method
Convolution: Graphical Method
• Shift by 0 to get y(0)

0 4 1 0 0 0 = 5 = y(0)
Convolution: Graphical Method
• Shift by -1 to get y(-1)

0 0 2 0 0 0 0 = 2 = y(-1)
Convolution: Graphical Method
• Shift by -2 to get y(-2)

0 0 0 0 0 0 0 0 = 0 = y(n) for n < -1


Convolution: Graphical Method
• Shift by 1 to get y(1)

-2 2 -1 0 0 = -1 = y(1)
Convolution: Graphical Method

• If x[n]=0 for n<N1 & h[n] is zero for n<N2, then x[n]*h[n]=0 for n<N1+N2 (O & W Q2.16a).
• If x[n]=0 for n>N3 & h[n]=0for n>N4, then x[n]*h[n]=0 for n>N3+N4
Convolution Output: Sum of scaled,

shifted impulse
Consider a LTI system with the
response
following unit impulse response:
h[n] = [0 0 1 1 1 0 0]

• For the input sequence:


x[n] = [0 0 0.5 2 0 0 0]

• The result is:


y[n] = … + x[0]h[n] + x[1]h[n-1] + …
= 0 + 0.5*[0 0 1 1 1 0 0] +
2.0*[0 0 0 1 1 1 0] +
0
= [0 0 0.5 2.5 2.5 2 0]
Convolution Output: sample by sample
• Consider the problem described
for previous example
• Sketch x[k] and h[n-k] for any
particular value of n, then
multiply the two signals and
sum over all values of k.
• For n<0, we see that x[k]h[n-k] =
0 for all k, since the non-zero
values of the two signals do not
overlap.
• y[0] = kx[k]h[0-k] = 0.5
• y[1] = kx[k]h[1-k] = 0.5+2
• y[2] = kx[k]h[2-k] = 0.5+2
• y[3] = kx[k]h[3-k] = 2
• As found in Example 1
Examples of DT Convolution
• Example: unit-pulse • Example: delayed unit-pulse
h[n] [ n] h[n] [ n n0 ]

y[n] x[k ] h[n k ] y[n] x[k ] h[n k ]


k k

x[k ] [n k ] x[n] x[k ] [n n0 k] x[n n0 ]


k k

Convolution with impulse give the


Convolution with shifted impulse
o/p which is equal to i/p
give the o/p which is equal to
i/p which is shifted by same
• Example: unit step amount

h[n] u[n]

y[n] x[k ] h[n k ]


k
n
x[k ] u[n k ] x[k ]
k k

• Convolution with impulse make


the accumulator
Convolution: Decaying signal to finally
approach a constant value
Convolution: Decaying signal to finally
approach a constant value
Convolution: Mathematical functions(both are
infinitely right sided sequences)
• Consider a LTI system that has a
impulse response h[n] = u[n] the unit
step signal(special case when b=1)
• What is the response when an input
signal of the form
x[n] = nu[n]
• where 0< <1, is applied?
• For n 0: n
k
y[n]
k 0
n 1
1
1

n 1
Therefore, y[n] 1
u[n]
1
• When two causal systems are convolved, the final system will also be causal (O & W Q2.19b).
• If x[n]=0 for n<N1 & h[n]=0 for n<N2, then x[n]*h[n]=0 for n<N1+N2 (O & W Q2.16a).
Convolution: Mathematical functions(one is
infinitely right sided and another is finite seq.)
Convolution: Mathematical functions(one is
infinitely right sided and another is finite seq.)
Convolution: Mathematical functions(one is
infinitely right sided and another is finite seq.)
Convolution: Mathematical functions(one is
infinitely right sided and another is finite seq.)
Convolution: Filtering
Convolution: Filtering
Matlab Exploration
Matlab Exploration: Visualization
Example: Convolution Integral of
two different duration pulses
Example: Find y(t) = x(t)*h(t) for x(t) and h(t) shown below using the graphical method.
Follow the procedure listed on the previous slide.
x(t) h(t)

2
1
t t
0 1 0 1 3

Solution:
1. Form x( ):
x( )

0 1

32
Example: Convolution of two different
duration pulses
h( ) 2. Form h(t - ): h(- )

2 2

Note: Remember that


0 1 3 -3 -1 0 is the independent
variable, not t.
t h(t- ) t is simply a constant.
h(t - ) = h(- + t), so t is
2
the amount of time
shift.
t-3 t-1 -3 -1 0

3. Consider different ranges of t (time-shift):


Each range of t selected should result in different portions of the
waveforms overlapping. The convolution y(t) = x(t)*h(t) is the area
under the product of the overlapping portions.

33
Example: Convolution of two pulses
3A. First range selected: (- <t < 1):
This range results in no overlap for all values of (i.e., - < < ).
h(t- ) x( )
h(t- ) sliding as t
varies over the 2
range - < t < 1
1

t-3 t-1 0 1

No overlap

x( )h(t - ) 0, - (no overlap for all )

and y(t) x( )h(t - )d 0d


- -

so y(t) 0 for - t 1

34
Example: Convolution of two pulses
3B.Second range selected: (1 <t < 2): Left part come into overlap, right part not
This range results in an overlap from = 0 to = t-1.
h(t- ) x( )
h(t- ) sliding as t
varies over the
2
range 1 < t < 2
1

t-3 0 t-1 1

Area of overlap between = 0 and = t-1

0 0
x( )h(t - ) 12 2 0 t -1
0 t -1
0 t -1
and y(t) x( )h(t - )d 0d 2d 0d
- - 0 t 1
t 1
y(t) 2 0
2(t - 1) for 1 t 2 35
Example: Convolution of two pulses
3C.Third range selected: (2 <t < 3): full overlap
This range results in an overlap from = 0 to = 1.
h(t- ) x( )
h(t- ) sliding as t 2
varies over the
range 2 < t < 3 1

t-3 0 1 t-1

Area of overlap between = 0 and = 1

0 0
x( )h(t - ) 1 2 2 0 1
0 1
1
and y(t) x( )h(t - )d 2d
- 0
1
y(t) 2 0
2(1 - 0) 2 for 2 t 3 36
Example: Convolution of two pulses
3D. Fourth range selected: (3 <t < 4): Right part is into overlap, left part go out
This range results in an overlap from = t-3 to = 1.
x( ) h(t- )
h(t- ) sliding as t
varies over the 2
range 3 < t < 4 1

0 t-3 1 t-1

Area of overlap between = t-3 and = 1

0 t 3
x( )h(t - ) 1 2 2 t -3 1
0 1
1
and y(t) x( )h(t - )d 2d
- t 3
1
y(t) 2 t 3
2 1- t - 3 2 4-t 8 - 2t for 3 t 4 37
Example: Convolution of two pulses
3E.Fifth range selected: (4 <t): fully go outside, no overlap
This range results in no overlap for all values of (i.e., - < < ).
x( ) h(t- ) sliding as t
h(t- ) varies over the
2 range t > 4
1

0 1 t-3 t-1

No
overlap

x( )h(t - ) 0, - (no overlap for all )

and y(t) x( )h(t - )d 0d


- -

so y(t) 0 for 4 t

38
Example: Convolution of two pulses
5. Compile the results of y(t) over the five ranges. Also graph y(t).

0 t 1
2t - 2 1 t 2
y(t) x(t) * h(t) 2 2 t 3
- 2t 8 3 t 4
0 4 t
y(t)

t
0 1 2 3 4

Convolution: A mathematical operator which computes the “amount of overlap” between two
functions. Can be thought of as a general moving average

39
Convolution: Graphical Representation
For the first pulse
Amp= 0.5
Time = -0.5 : 0.5 sec
Green one is the output if blue and red will convolve.

Convolution demo
http://www.jhu.edu/signals/
http://www.isip.piconepress.com/projects/speech/software/demonstrations/applets/util/convolution/current/index.html
http://dsp.feit.ukim.edu.mk/demos/Konvolucija.html
http://dsp.feit.ukim.edu.mk/demos/analogconv/Analog%20Convolution.html
http://users.ece.gatech.edu/~bonnie/book/OnlineDemos/CTConv/
Communication:Transmit One Bit
• Transmission over communication channel
(e.g. telephone line) is analog
x0 (t ) y0 (t ) receive
‘0’ bit ‘0’ bit
input output
p Communication h h+ p
t
t Channel
x(t) y(t) -A Th
-A

x1 (t ) y1 (t )
receive‘
Model channel as h(t )
1’ bit
A LTI system with 1 A Th
impulse response
t
t t h(t)
h+ p
p t
h h
‘1’ bit Assume that Th < Tp
4 - 41
Transmit Two Bits (Interference)
• Transmitting two bits (pulses) back-to-back
will cause overlap (interference) at the
receiver h(t )
x(t ) y (t )
A
* 1 =
h+ p
p

t h t t
p p
-A Th
‘1’ bit ‘0’ bit Assume that Th < Tp ‘1’ bit ‘0’ bit

• How do we prevent intersymbol intersymbol


interference at the receiver? interference

4 - 42
Preventing ISI at Receiver
• Option #1: wait Th seconds between pulses in
transmitter (called guard period or guard interval)
x(t ) h(t )
y (t )
A
* 1 =
h+ b h+ b

t h t t
b h b
-A Th
‘1’ bit ‘0’ bit Assume that Th < Tb ‘1’ bit ‘0’ bit

Disadvantages? Data rate reduces.


• Option #2: use channel equalizer in receiver
FIR filter designed via training sequences sent by transmitter
Design goal: cascade of channel memory and channel
equalizer should give all-pass frequency response
13 - 43
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: AC Frequency doesn’t change
Convolution: Amplitude and phase change
Convolution: Amplitude and phase change
Convolution: Amplitude and phase change
Convolution: Amplitude and phase change
Convolution: direct integration
Convolution can be performed by direct evaluation of the convolution integral
(without sketching graphs) for fairly straightforward functions. This becomes
difficult for piecewise-continuous functions, such as were used in many of our
graphical examples.

Example 6: Evaluate y(t) = x(t)*h(t) for: x(t) = u(t), h(t) = u(t) by directly evaluating
the convolution integral rather than through a graphical approach.
Solution :

y(t) x(t) * h(t) x( )h(t - )d (definition)


-

y(t) u( )u(t - )d
-
u(t - ) = 1 only for < t so change upper limit to t
so u( ) = 1 only for > 0 so change lower limit to 0
t t
y(t) 1 1d t -0 t tu(t)
0
0 A graphical approach would show that the functions
so overlap for 0 < t < or else note that x(t) and y(t) both
u(t)*u(t) = tu(t) are non-zero for t > 0.

54
Important Convolution

Table 2-1 from Signals &


Systems, 2nd Edition, by
Lathi

55
Important Convolution

Table 9-1 from


Signals & Systems,
2nd Edition, by Lathi
Convolution: Shifting Function Selection
Convolution: Shifting Function Selection
2( t 0.5)
• Line equation for f2(t- )= 2[ ( ) 0.5] 2[ 0.5]
2[ t 0.5]
• For

• Case(1): -0.5<=t<0
• Case(2): -0.5+t<=-0.5, t<0.5; 0<t<=0.5
• Case(3): -0.5+t<=0.5; 0.5<t<=1
Hint: Shift and delay
the simplest waveform

Select a piecewise constant amplitude function for reversal and shifting function.
http://cnyack.homestead.com/files/aconv/conv2.htm
Convolution: Shifting Function Selection

• Solution
• For this problem I choose to flip x[n]
• Some authors prefer to flip the shorter signal. My
personal preference is to flip the simple signal although
I sometimes don’t follow that “rule”…only through lots
of practice you can learn how to best choose which
one to flip.
Convolution: Shifting Function Selection
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: ramp up and ramp down
Convolution: Big Picture

Book: Kamen and Heck


Convolution
Convolution: Matrix method
Expand the formula of convolution and find out the terms for different
value of n.
Convolution: Tabular Method
Convolution: Implementation
Uses/Application of Convolution
EXAMPLE OF CONVOLUTION

* =
DECONVOLUTION: A solution

(*)-1 =
DECONVOLUTION

Y HX
X H 1Y

N
y[n] x[n]* h[n] x[k ]h[n k ]
k 0
N 1
y[n] x[k ]h[n k ] x[n]h[0]
k 0
N 1
y[n] x[k ]h[n k ]
k 0
x[n]
h[0]
Acknowledgement
• Various graphics used here has been taken from
public resources instead of redrawing it. Thanks to
those who have created it.
• Thanks to:
– Signals and Systems, Haykin & Van Veen

20 January 2011 81

Vous aimerez peut-être aussi