• No results found

Differential Equations. Solving for Impulse Response. Linear systems are often described using differential equations.

N/A
N/A
Protected

Academic year: 2021

Share "Differential Equations. Solving for Impulse Response. Linear systems are often described using differential equations."

Copied!
13
0
0

Loading.... (view fulltext now)

Full text

(1)

Differential Equations

Linear systems are often described using differential equations. For example:

d2y dt2 + 5

dy

dt + 6y = f (t)

where f(t) is the input to the system and y(t) is the output.

We know how to solve for y given a specific inputf.

We now cover an alternative approach:

Equation Differential convolution Corresponding Output solve Any input Impulse response

Solving for Impulse Response

We cannot solve for the impulse response directly so we solve for the step response and then differentiate it to get the impulse response.

convolution Corresponding Output Equation Differential solve differentiate Any input Impulse response Step response

(2)

Motivation: Convolution

If we know the response of a linear system to a step input, we can calculate the impulse response and hence we can find the response to any input by convolution.

Suppose we want to know how a car’s suspension re-sponds to lots of different types of road surface.

We measure how the suspension responds to a step input (or calculate the step response from a theoreti-cal model of the system).

We can then find the impulse response and use con-volution to find the car’s behaviour for any road sur-face profile.

Solving for Step Response

If we want to find the step response of

dy

dt + 5y = f (t)

where f is the input and y is the output. It would be nice if we could putf (t) = H(t) and solve. Unfortu-nately we don’t know of a way to do this directly. So we

1. set f (t) = 1, and solve for justt ≥ 0

2. set the boundary conditiony(0) = 0(alsoy(0) =˙ 0 for second order equations) to imply that f (t)

was zero for all t < 0.

We thus have a complete solution becausey = 0 for

(3)

Boundary Condition Justification

Prove that y = 0 at t = 0 by contradiction.

We know that y(t) = 0 for all t < 0. Therefore the only way for y to equal something other than zero at

t = 0 is if there is a step discontinuity in y at t = 0. Assume that y has a step of height h at t = 0. If y

has a step discontinuity at t = 0 then dydt must have a delta function at t = 0.

So we have:

• f(t) is a step function so |f(t)| ≤ 1 for all t.

• |y| ≤ h at t = 0. • dy dt → ∞ at t = 0.

Which violates the original equation at t = 0.

dy

dt = f (t) − 5y

As the RHS is finite but the LHS is infinite. Therefore

y must be continuous at t = 0, and we can use the initial condition y(0) = 0.

Step Response Example

Step 1: setf (t) = 1, and solve for just t ≥ 0.

dy

dt + 5y = 1

Complimentary function: y + 5y = 0 ⇒ y = Ae˙ −5t

Particular Integral: try y = λ(a const) ⇒ y = 15 General Solution: y = Ae−5t+ 15

Step 2: set the boundary condition y = 0at t = 0

y(0) = 0 ⇒ A + 15 = 0 ⇒ A = −15

(4)

Step

Impulse Response

Impulse

Response

g(t)

Step

differentiate integrate

Response

Step response isy(t) = 151 − e−5t for t ≥ 0.

Impulse response g(t) is given by:

g(t) =          0, t < 0 d dt 1 5  1 − e−5t  = e−5t, t ≥ 0

Find the Impulse Response

d2y

dt2 + 13 dy

dt + 12y = f (t)

1. Find the General Solution with f (t) = 1

Complimentary function isy = Ae−12t+ Be−t

Particular integral is y = 121

General solution isy = 121 + Ae−12t+ Be−t

2. Set boundary conditionsy(0) = ˙y(0) = 0 to get the step response.

1

12 + A + B = 0

−12A − B = 0

⇒ A = 1321 and B = −111

Thus Step Response is y = 121 + e132−12t e11−t

3. Differentiate the step response to get the impulse

response.

g(t) = dy dt =

e−t − e−12t

(5)

Using the Impulse Response

If we have a system input composed of impulses,

f (t) = 3δ(t − 1) + 4δ(t − 2)

we can find the corresponding system output using superposition. y(t) = 3g(t − 1) + 4g(t − 2) = 3   e−(t−1) − e−12(t−1) 11   +4   e−(t−2)− e−12(t−2) 11  

More General Input

Suppose our input is composed of lots of delta func-tions:

f (t) = X

n

pnδ(t − qn)

Then the corresponding system output will be

y(t) = X

n

(6)

Section 2: Summary

ay + by + cy + d = f(t) Differential Equation convolution Corresponding Output differentiate ay + by + cy + d = 1 Any input Impulse response Step response solve

with boundary conditions y(0) = 0 and y(0) = 0

Section 3

Convolution

In this section we derive the convolution integral and show its use in some examples.

(7)

Convolution

Our goal is to calculate the output,y(t)of a linear sys-tem using the input, f (t), and the impulse response of the system, g(t).

An impulse at time t = 0 produces the impulse re-sponse.

Linear

System

t

t

(t)

δ

g(t)

An impulse delayed to timet = τ produces a delayed impulse response starting at time τ.

Linear

System

g(t− )

τ

τ

t

τ

t

τ

(t− )

δ

A scaled impulse at time t = 0 produces a scaled impulse response.

Linear

System

t

t

g(t)

δ

(t)

k

k

An impulse that has been scaled by k and delayed to time t = τ produces an impulse response scaled by

k and starting at timeτ.

Linear

System

g(t− )

τ

τ

t

τ

t

τ

(t− )

δ

k

k

(8)

Consider the input,f (t) to be made up of a sequence of strips of width ∆τ. Each of these strips is similar to a delta function and thus leads to a system out-put of an appropriately scaled and delayed impulse response.

(t− ) f( )

δ τ

τ ∆τ

∆τ

∆τ

τ

t

f(t)

leads to response

g(t− ) f( )

τ

τ

The response of the system, y(t) is thus the sum of these delayed, scaled impulse responses. (Provided

g(t) = 0 for t < 0.)

y(t) ≈ X All slices

g(t − τ)f(τ)∆τ

Let the width of the slices tend to zero. The sum turns into an integral called the convolution integral.

y(t) = Z t −∞g(t − τ)f(τ)dτ y(t) = Z t −∞g(t − τ)f(τ)dτ

• Treattas a constant when evaluating the integral. The integration variable isτ.

• t is time as it relates to the output of the system

y(t).

• τ is time as it relates to the input of the system

(9)

Convolution Example 1

Consider a system with impulse response

g(t) = (

0 , t < 0 e−5t , t ≥ 0

Find the output for input f (t) = H(t) (step function).

y(t) = Z t −∞g(t − τ)f(τ)dτ = Z t −∞e −5(t−τ )H(τ )dτ = Z t 0 e −5(t−τ ) = 1 5e −5(t−τ )t 0 = 1 5  1 − e−5t

Convolution Example 2

For the same system (g(t) = e−5t, t ≥ 0), find the output for input

f (t) =      0, t < 0 v, 0 < t < k 0, t > k

k

v

f(t)

t

Using the convolution integral, the answer is given by

y(t) = Z t −∞g(t − τ)f(τ)dτ =                                Rt −∞g(t − τ) × 0 dτ, t < 0 R0 −∞g(t − τ) × 0 dτ +Rt 0g(t − τ) v dτ, 0 < t < k R0 −∞g(t − τ) × 0 dτ +Rk 0 g(t − τ) v dτ +Rt kg(t − τ) × 0 dτ, t > k

(10)

Case (a): t < 0 Rt

−∞g(t − τ) × 0 dτ = 0 so y(t) = 0 for all t < 0. Case (b): 0 < t < k y(t) = Z t 0 g(t − τ) v dτ = Z t 0 e −5(t−τ )v dτ = v 5 h e−5(t−τ )it 0 = v 5  1 − e−5t Case (c): t > k y(t) = Z k 0 g(t − τ) v dτ = Z k 0 e −5(t−τ )v dτ = v 5 h e−5(t−τ )ik 0 = v 5  e5k − 1e−5t

(a)

(b)

k

(c)

y(t)

t

Convolution Example 3

For the same system (g(t) = e−5t, t ≥ 0), find the output for input

f (t) = ( 0, t < 0 sin(ωt), t > 0 t f(t)

Using the convolution integral, the answer is given by

y(t) = Z t −∞g(t − τ)f(τ)dτ =            Rt −∞g(t − τ) × 0 dτ, t < 0 R0 −∞g(t − τ) × 0 dτ +Rt 0g(t − τ) sin(ωτ) dτ, 0 < t

(11)

Case (a): t < 0 Rt

−∞g(t − τ) × 0 dτ = 0 so y(t) = 0 for all t < 0.

Case (b): 0 < t y(t) = Z t 0 g(t − τ) sin(ωτ) dτ = Z t 0 e −5(t−τ )sin(ωτ ) dτ = Im Z t 0 e −5(t−τ )eiωτ  = Im      e−5t   e(5+iω)τ 5 + iω   t 0      = Im ( eiωt− e−5t 5 + iω )

= 5 sin(ωt) − ω cos(ωt) + ωe−5t 25 + ω2

Convolution Summary

ay + by + cy + d = f(t) Differential Equation convolution differentiate ay + by + cy + d = 1 Step response solve

with boundary conditions y(0) = 0 and y(0) = 0

Corresponding Impulse response: g(t) Output: y(t) Any Input: f(t) y(t) = Z t −∞ g(t − τ) f(τ) dτ

(12)

Complete Example

Find the impulse response of

d2y dt2 + 3

dy

dt + 2y = f (t)

hence find the output when the inputf (t) = H(t)e−t.

1. Find the General Solution with f (t) = 1

Complimentary function isy = Ae−t + Be−2t

Particular integral is y = 12

General solution is y = 12 + Ae−t + Be−2t

2. Set boundary conditions y(0) = ˙y(0) = 0 to get the step response.

1

2 + A + B = 0

−A − 2B = 0

⇒ A = −1and B = 12

Thus Step Response is y = 12 − e−t + e−2t2

3. Differentiate the step response to get the impulse

response.

g(t) = dy dt = e

−t − e−2t

4. Use the convolution integral to find the output for

the required input.

The required input isf (t) = e−t, t > 0.

y(t) = Z t −∞g(t − τ)f(τ)dτ = Z t 0  e−(t−τ )− e−2(t−τ )e−τ dτ = Z t 0 e −t − eτ −2t = hτ e−t − eτ −2tit 0 = (t − 1) e−t+ e−2t

(13)

Section 3: Summary

Convolution integral (memorise this):

f (t) = input g(t) = impulse response y(t) = output y(t) = Z t −∞ g(t − τ) f(τ) dτ

Way to find the output of a linear system, described by a differential equation, for an arbitrary input:

• Find general solution to equation for input = 1.

• Set boundary conditionsy(0) = ˙y(0) = 0 to get the step response.

• Differentiate to get the impulse response.

• Use convolution integral together with the impulse response to find the output for any desired input.

Section 4

Evaluating Convolution Integrals

A way of rearranging the convolution integral is de-scribed and illustrated.

The differences between convolution in time and space are discussed and the concept of causality is intro-duced.

The section ends with an example of spatial convolu-tion.

References

Related documents