16
29/07/2020, 10:18 convolution Page 1 of 16 http://localhost:8888/nbconvert/html/5/convolution.md?download=false The Impulse Response and Convolution Colophon An annotatable worksheet for this presentation is available as Worksheet 8 (https://cpjobling.github.io/eg-247-textbook/laplace_transform/5/worksheet8.html) . The source code for this page is laplace_transform/5/convolution.ipynb (https://github.com/cpjobling/eg-247-textbook/blob/master/laplace_transform/5/convolution.ipynb) . You can view the notes for this presentation as a webpage (HTML (https://cpjobling.github.io/eg- 247-textbook/laplace_transform/5/convolution.html) ). This page is downloadable as a PDF (https://cpjobling.github.io/eg-247- textbook/laplace_transform/5/convolution.pdf) file. Scope and Background Reading This section is an introduction to the impulse response of a system and time convolution. Together, these can be used to determine a Linear Time Invariant (LTI) system's time response to any signal. As we shall see, in the determination of a system's response to a signal input, time convolution involves integration by parts and is a tricky operation. But time convolution becomes multiplication in the Laplace Transform domain, and is much easier to apply. The material in this presentation and notes is based on Chapter 6 (https://ebookcentral.proquest.com/lib/swansea-ebooks/reader.action? ppg=185&docID=3384197&tm=1518698533541) of Karris{cite} karris . Agenda The material to be presented is: Even and Odd Functions of Time Time Convolution

The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 1 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

The Impulse Response and Convolution

ColophonAn annotatable worksheet for this presentation is available as Worksheet 8(https://cpjobling.github.io/eg-247-textbook/laplace_transform/5/worksheet8.html).

The source code for this page is laplace_transform/5/convolution.ipynb(https://github.com/cpjobling/eg-247-textbook/blob/master/laplace_transform/5/convolution.ipynb).You can view the notes for this presentation as a webpage (HTML (https://cpjobling.github.io/eg-247-textbook/laplace_transform/5/convolution.html)).This page is downloadable as a PDF (https://cpjobling.github.io/eg-247-textbook/laplace_transform/5/convolution.pdf) file.

Scope and Background ReadingThis section is an introduction to the impulse response of a system and time convolution. Together, thesecan be used to determine a Linear Time Invariant (LTI) system's time response to any signal.

As we shall see, in the determination of a system's response to a signal input, time convolution involvesintegration by parts and is a tricky operation. But time convolution becomes multiplication in the LaplaceTransform domain, and is much easier to apply.

The material in this presentation and notes is based on Chapter 6(https://ebookcentral.proquest.com/lib/swansea-ebooks/reader.action?ppg=185&docID=3384197&tm=1518698533541) of Karris{cite} karris .

AgendaThe material to be presented is:

Even and Odd Functions of TimeTime Convolution

Page 2: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 2 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Graphical Evaluation of the Convolution IntegralSystem Response by Laplace

Even and Odd Functions of Time(This should be revision!)

We need to be reminded of even and odd functions so that we can develop the idea of time convolutionwhich is a means of determining the time response of any system for which we know its impulseresponse to any signal.

The development requires us to find out if the Dirac delta function ( ) is an even or an odd function oftime.

!(")

Even Functions of TimeA function is said to be an even function of time if the following relation holds

that is, if we relace with the function does not change.

#(")#(!") = #(")

" !" #(")

Polynomials with even exponents only, and with or without constants, are even functions.

For example:

is even.

cos " = 1 ! + ! + …"2

2!"4

4!"6

6!

Other Examples of Even Functions

Page 3: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 3 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Odd Functions of TimeA function is said to be an odd function of time if the following relation holds

that is, if we relace with , we obtain the negative of the function .

#(")!#(!") = #(")

" !" #(")

Polynomials with odd exponents only, and no constants, are odd functions.

For example:

is odd.

sin " = " ! + ! + …"3

3!"5

5!"7

7!

Other Examples of Odd Functions

ObservationsFor odd functions .If we should not conclude that is an odd function. c.f. is even, not odd.The product of two even or two odd functions is an even function.The product of an even and an odd function, is an odd function.

#(0) = 0#(0) = 0 #(") #(") = "2

In the following will denote an even function and an odd function.(")#$ (")#%

Time integrals of even and odd functions

Page 4: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 4 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

For an even function (")#$

(")&" = 2 (")&"!'

!'#$ !

'

0#$

For an odd function (")#%

(")&" = 0!'

!'#%

Even/Odd Representation of an Arbitrary FunctionA function that is neither even nor odd can be represented as an even function by use of:#(")

(") = [#(") + #(!")]#$12

or as an odd function by use of:

(") = [#(") ! #(!")]#%12

Adding these together, an abitrary signal can be represented as#(") = (") + (")#$ #%

That is, any function of time can be expressed as the sum of an even and an odd function.

Example 1Is the Dirac delta an even or an odd function of time?

We'll decide in class.

!(")

Page 5: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 5 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Solution to example 1

Let be an arbitrary function of time that is continous at . Then by the sifting property of thedelta function

and for

Also for an even function

and for an odd function

Even or odd?

An odd function evaluated at is zero, that is .

Hence

Hence the product is odd function of .

Since is odd, must be even because only an even function multiplied by an odd function canresult in an odd function.

(Even times even or odd times odd produces an even function. See earlier slide)

#(") " = "0

#(")!(" ! )&" = #( )!"

!""0 "0

= 0"0

#(")!(")&" = #(0)!"

!"

(")#$

(")!(")&" = (0)!"

!"#$ #$

(")#%

(")!(")&" = (0)!"

!"#% #%

(")#% " = 0 (0) = 0#%

(")!(")&" = (0) = 0!"

!"#% #%

(")!(")#% "

(")#% !(")

Time ConvolutionConsider a system whose input is the Dirac delta ( ), and its output is the impulse response .!(") ((")

Page 6: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 6 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

We can represent the input-output relationship as a block diagram

In general

Add an arbitrary inputLet be any input whose value at is , Then because of the sampling property of the deltafunction

(output is )

)(") " = * )(*)

)(*)((" ! *)

Integrate both sidesIntegrating both sides over all values of ( ) and making use of the fact that the deltafunction is even, i.e.

we have:

* !" < * < "

!(" ! *) = !(* ! ")

Page 7: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 7 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Use the sifting property of deltaThe second integral on the left side reduces to )(")

The Convolution Integral

The integral

)(*)((" ! *)&*!"

!"

or

)(" ! *)((*)&*!"

!"

is known as the convolution integral; it states that if we know the impulse response of a system, we cancompute its time response to any input by using either of the integrals.

Page 8: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 8 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

The convolution integral is usually written or where the asterisk ( ) denotesconvolution.

)(") # ((") ((") # )(") #

Graphical Evaluation of the Convolution IntegralThe convolution integral is most conveniently evaluated by a graphical evaluation. The text book givesthree examples (6.4-6.6) which we will demonstrate in class using a graphical visualization tool(https://uk.mathworks.com/matlabcentral/fileexchange/25199-graphical-demonstration-of-convolution)developed by Teja Muppirala of the Mathworks.

The tool: convolutiondemo.m (https://cpjobling.github.io/eg-247-textbook/laplace_transform/matlab/convolution_demo/convolutiondemo.m) (see license.txt(https://cpjobling.github.io/eg-247-textbook/laplace_transform/matlab/convolution_demo/license.txt)).

In [1]: clear allcd ../matlab/convolution_demopwdformat compact

In [2]: convolutiondemo % ignore warnings

ans =

'/Users/eechris/code/src/github.com/cpjobling/eg-247-textbook/laplace_transform/matlab/convolution_demo'

Page 9: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 9 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Convolution by Graphical Method - Summary of Steps

For simplicity, we give the rules for , but the procedure is the same if we reflect and slide )(") ((")

1. Substitute with – this is a simple change of variable. It doesn't change the definition of .

)(") )(*))(")

Warning: The EraseMode property is no longer supported and will error in a future release.> In convolutiondemo>convolutiondemo_LayoutFcn (line 398) In convolutiondemo>gui_mainfcn (line 1188) In convolutiondemo (line 44)Warning: The EraseMode property is no longer supported and will error in a future release.> In convolutiondemo>convolutiondemo_LayoutFcn (line 449) In convolutiondemo>gui_mainfcn (line 1188) In convolutiondemo (line 44)Warning: The EraseMode property is no longer supported and will error in a future release.> In convolutiondemo>convolutiondemo_LayoutFcn (line 500) In convolutiondemo>gui_mainfcn (line 1188) In convolutiondemo (line 44)Warning: The EraseMode property is no longer supported and will error in a future release.> In convolutiondemo>convolutiondemo_LayoutFcn (line 551) In convolutiondemo>gui_mainfcn (line 1188) In convolutiondemo (line 44)Warning: The EraseMode property is no longer supported and will error in a future release.> In convolutiondemo>convolutiondemo_LayoutFcn (line 621) In convolutiondemo>gui_mainfcn (line 1188) In convolutiondemo (line 44)Warning: The EraseMode property is no longer supported and will error in a future release.> In convolutiondemo>convolutiondemo_LayoutFcn (line 672) In convolutiondemo>gui_mainfcn (line 1188) In convolutiondemo (line 44)Warning: The EraseMode property is no longer supported and will error in a future release.> In convolutiondemo>convolutiondemo_LayoutFcn (line 723) In convolutiondemo>gui_mainfcn (line 1188) In convolutiondemo (line 44)Warning: The EraseMode property is no longer supported and will error in a future release.> In convolutiondemo>convolutiondemo_LayoutFcn (line 774) In convolutiondemo>gui_mainfcn (line 1188) In convolutiondemo (line 44)

Page 10: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 10 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

1. Reflect about the vertical axis to form )(*) )(!*)

1. Slide to the right a distance to obtain )(!*) " )(" ! *)

1. Multiply the two signals to obtain the product )(" ! *)((*)

1. Integrate the product over all from to .* !" "

Examples

We will do these live in class.

Example 2

(This is example 6.4 in the textbook)

The signals and are shown below. Compute using the graphical technique.((") )(") ((") # )(")

Page 11: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 11 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

h(t)

The signal is the straight line but this is defined only between and . Wethus need to gate the function by multiplying it by as illustrated below:

Thus

u(t)

The input is the gating function:

so

((") #(") = !" + 1 " = 0 " = 1(") ! (" ! 1))0 )0

((") $ +(,)((") = (!" + 1)( (") ! (" ! 1)) = (!" + 1) (") ! (!(" ! 1) (" ! 1)) = !" (") + (") + (" ! 1))0 )0 )0 )0 )0 )0

!" (") + (") + (" ! 1) (" ! 1) $ ! + +)0 )0 )01,2

1,

$!,

,2

+(,) = , + ! 1$!,

,2

)("))(") = (") ! (" ! 1))0 )0

-(,) = ! =1,

$!,

,1 ! $!,

,

Prepare for convolutiondemo

To prepare this problem for evaluation in the convolutiondemo tool, we need to determine theLaplace Transforms of and .((") )(")

convolutiondemo settings

Let g = (1 - exp(-s))/sLet h = (s + exp(-s) - 1)/s^2Set range !2 < * < !2

Page 12: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 12 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Summary of result

1. For :

2. For : and 3. For :

4. For :

5. For :

" < 0)(" ! *)((*) = 0

" = 0 )(" ! *) = )(!*) )(!*)((*) = 00 < " % 1

( # ) = (1)(!* + 1)&* = = " ! /2!"

0* ! /2*2 &&

"0 "2

1 < " % 2

( # ) = (!* + 1)&* = = /2 ! 2" + 2!1

"!1* ! /2*2 &&

1"!1 "2

2 % ")(" ! *)((*) = 0

Example 3

This is example 6.5 from the text book.((") = $!"

)(") = (") ! (" ! 1))0 )0

Answer 3

.(") =!

"#$$

0 : " % 01 ! : 0 < " % 1$!"

($ ! 1) : 1 < " < "$!"

Check with MATLAB

In [3]: syms t taux1=int(exp(-tau),tau,0,t)

In [4]: x2=int(exp(-tau),tau,t-1,t)

x1 =1 - exp(-t)

x2 =exp(-t)*(exp(1) - 1)

Page 13: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 13 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Example 4

This is example 6.6 from the text book.((") = 2( (") ! (" ! 1)))0 )0

)(") = (") ! (" ! 2))0 )0

Answer 4

.(") =

!

"

#$$$$

0 : " % 02" : 0 < " % 12 : 1 < " % 2!2" + 6 : 2 < " % 30 : 3 % "

System Response by LaplaceIn the discussion of Laplace, we stated that

We can use this property to make the solution of convolution problems even simpler.

! {#(") # /(")} = 0 (,)1(,)

Page 14: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 14 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Impulse Response and Transfer FunctionsReturning to the example we started with

Then the impulse response of the system will be given by:

Where be the laplace transform of the impulse response of the system . From properties of theLaplace transform we know that

so that and

A consequence of this is that the transform of the impulse response of a system with transferfunction is completely defined by the transfer function itself.

Previously we argued that the response of system with impulse response was given by theconvolution integrals:

Thus the Laplace transform of any system subject to an input is simply

and

Using tables, solution of a convolution problem by Laplace is usually simpler than using convolutiondirectly.

((")! {((") # !(")} = +(,)'(,)

+(,) ((")

!(") $ 1

'(,) = 1((") # !(") $ +(,).1 = +(,)

((")+(,)

((")

((") # )(") = )(*)((" ! *)&* = )(" ! *)((*)&*!"

!" !"

!"

)(")2 (,) = +(,)-(,)

.(") = {1(,)-(,)}!!1

More ExamplesWe will work through these in class

Page 15: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 15 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Example 5

This is example 6.7 from the textbook.

For the circuit shown above, show that the transfer function of the circuit is:

Hence determine the impulse respone of the circuit and the response of the capacitor voltage whenthe input is the unit step function and .

Assume and .

+(,) = =(,)34(,)3,

1/56, + 1/56

((")("))0 ( ) = 074 0!

6 = 1 F 5 = 1 (

Solution 5a - Impulse response

which when and reduces to

.

((") = (")156

$!"/56)0

6 = 1 F 5 = 1 (((") = (")$!" )0

Page 16: The Impulse Response and Convolutionis known as the convolution integral; it states that if we know the impulse response of a system, we can compute its time response to any input

29/07/2020, 10:18convolution

Page 16 of 16http://localhost:8888/nbconvert/html/5/convolution.md?download=false

Solution 5b - Step response

By PFE

The residues are , , so

((") = (") $ +(,) =$!" )01

, + 1)(") = (") $ -(,) =)0

1,

.(") = ((") # )(") $ 2 (,) = +(,)-(,) = ( ) ) ( )1, + 1

1,

2 (,) = +81, + 1

82,

= !181 = 182

2 (,) = ! + $ .(") = (1 ! ) (")1, + 1

1,

$!" )0

HomeworkVerify this result using the convolution integral

ReferenceSee Bibliography (/zbib).

((") # )(") = )(*)((" ! *)&*!"

!"