0% found this document useful (0 votes)
9 views

Ch02_handout

Signals and Systems: A MATLAB Integrated Approach for Ch2

Uploaded by

冯昊阳
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Ch02_handout

Signals and Systems: A MATLAB Integrated Approach for Ch2

Uploaded by

冯昊阳
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Chapter 2

Analyzing Continuous-Time Systems


in the Time Domain

© 2014 by Oktay Alkin

Southern Illinois University Edwardsville


Dept. of Ele tri al and Computer Engineering
Edwardsville, IL 62026, USA

CRC Press
Taylor & Fran is Group
All Rights Reserved.

Chapter 2
Obje tives

Obje tives

Develop the notion of a ontinuous-time system.

Learn simplifying assumptions made in the analysis of systems. Dis uss the
on epts of linearity and time-invarian e, and their signi an e.

Explore the use of dierential equations for representing ontinuous-time systems.

Develop methods for solving dierential equations to ompute the output signal
of a system in response to a spe ied input signal.

Learn to represent a dierential equation in the form of a blo k diagram that an


be used as the basis for simulating a system.

Dis uss the signi an e of the impulse response as an alternative des ription form
for linear and time-invariant systems.

Learn how to ompute the output signal for a linear and time-invariant system
using onvolution.

Learn the on epts of ausality and stability as they relate to physi ally realizable
and usable systems.
Chapter 2
Introdu tion

Introdu tion

System

In general, a system is any physi al entity that takes in a set of one or more physi al
signals and, in response, produ es a new set of one or more physi al signals.

A system an be viewed as any


x (t) System y (t)
physi al entity that denes the
ause-ee t relationships between a
x(t) y(t) set of signals known as inputs and
another set of signals known as
outputs.
t t

Mathemati al modeling

The mathemati al model of a system is a fun tion, formula or algorithm (or a set of
fun tions, formulas, algorithms) to approximately re reate the same ause-ee t
relationship between the mathemati al models of the input and the output signals.

Chapter 2
Introdu tion

Introdu tion ( ontinued)

x (t) System y (t)

x(t) y(t)

t t

y (t) = Sys fx(t)g

Some examples:
y (t) = K x (t)

y (t) = x (t  )

y (t) = K [x (t)℄2
Chapter 2
Linearity and Time-Invarian e

Linearity in ontinuous-time systems

Conditions for linearity

Sys fx1 (t) + x2 (t)g = Sys fx1 (t)g + Sys fx2 (t)g
Sys f 1 x1 (t)g = 1 Sys fx1 (t)g
x1 (t), x2 (t): Any two input signals; 1 : Arbitrary onstant gain fa tor.

Superposition prin iple ( ombine the two onditions into one)

Sys f 1 x1 (t) + 2 x2 (t)g = 1 Sys fx1 (t)g + 2 Sys fx2 (t)g


x1 (t), x2 (t): Any two input signals; 1, 2 : Arbitrary onstant gain fa tors.

α1 α1
x1 (t) x1 (t) Sys{..}

Sys{..} y(t) ≡ y(t)


α2 α2
x2 (t) x2 (t) Sys{..}

Chapter 2
Linearity and Time-Invarian e

Linearity in ontinuous-time systems ( ontinued)


If superposition works for the weighted sum of any two input signals, it also works for
an arbitrary number of input signals.
( )
N
X N
X N
X
Sys i xi (t) = i Sys fxi (t)g = i yi (t)
i=1 i=1 i=1

α1 α1
x1 (t) Sys{..} y(t) x1 (t) Sys{..} y(t)

α2 α2
x2 (t) x2 (t) Sys{..}

b
≡ b

b b

b b

αN αN
xN (t) xN (t) Sys{..}
Chapter 2
Linearity and Time-Invarian e

Example 2.1

Solution:
Testing linearity of ontinuous-time
systems a.

Four dierent systems are des ribed


below. For ea h, determine if the system
y (t) =5 x (t)
is linear or not: =5 [ 1 x1 (t) + 2 x2 (t)℄
a. y (t) = 5 x (t) = 1 [5 x1 (t)℄ + 2 [5 x2 (t)℄
b. y (t) = 5 x (t) + 3 = 1 y1 (t) + 2 y2 (t)
. y (t) = 3 [x (t)℄2 Superposition prin iple holds; therefore
d. y (t) = os (x (t)) this system is linear.

.
b.
y (t) = 3 [ 1 x1 (t) + 2 x2 (t)℄2
y (t) =5 x (t) + 3 = 3 21 [x1 (t)℄2 + 6 1 2 x1 (t) x2 (t)
=5 1 x1 (t) + 5 2 x2 (t) + 3
+ 3 22 [x2 (t)℄2
Superposition prin iple does not hold
Superposition prin iple does not hold
true. The system in part (b) is not
true. The system in part ( ) is not
linear.
linear.

Chapter 2
Linearity and Time-Invarian e

Example 2.1 ( ontinued)


d.
y (t) = os [ 1 x1 (t) + 2 x2 (t) ℄
Superposition prin iple does not hold true. The system in part (d) is not linear.

MATLAB Exer ise 2.1


Chapter 2
Linearity and Time-Invarian e

Time-invarian e in ontinuous-time systems

Condition for time-invarian e

Sys fx (t)g = y (t) implies that Sys fx(t  )g = y (t  )

x(t) y(t)

t x(t) System y(t) t

x(t − τ ) y(t − τ )

t x(t − τ ) System y(t − τ ) t


τ τ

Chapter 2
Linearity and Time-Invarian e

Time-invarian e in ontinuous-time systems ( ontinued)


Alternatively, time invarian e an be explained by the equivalen e of the two system
ongurations shown:

Delay x (t − τ )
x (t) System y (t − τ )
(τ )

y (t) Delay
x (t) System y (t − τ )
(τ )
Chapter 2
Linearity and Time-Invarian e

Example 2.2

Testing time-invarian e of ontinuous-time systems

Three dierent systems are des ribed below. For ea h, determine if the system is
time-invariant or not:

a. y (t) = 5 x (t)
b. y (t) = 3 os (x (t))
. y (t) = 3 os (t) x (t)

Solution:

a. Sysfx (t  )g = 5 x (t  ) = y (t  ) Time-invariant.

b. Sysfx (t  )g = 3
os ( x (t  ) ) = y (t  ) Time-invariant.

. Sysfx (t  )g = 3 os (t) x (t  ) 6= y (t  ) Not time-invariant.

MATLAB Exer ise 2.2

Chapter 2
Linearity and Time-Invarian e

Example 2.3

Using linearity property

A ontinuous-time system is known to be linear. Whether the system is time-invariant


or not is not known. Assume that the responses of the system to four input signals
x1 (t), x2 (t) x3 (t) and x4 (t) shown below are known. Dis uss how the information
provided an be used for nding the response of this system to the signal x (t) shown.

x1 (t) x2 (t)

1 1
1 2
t t
0.5 1.5
−1

x3 (t) x4 (t)

1 0.5 1.5 2.5


t t
0.5
−1
−1.25
Chapter 2
Linearity and Time-Invarian e

Example 2.3 ( ontinued)

x (t)

1
1.5 2.5
t x (t) Sys{..} y (t)
0.5
−1

Solution:

x (t) = 0:6 x2 (t) + 0:8 x4 (t) ) y (t) = 0:6 y2 (t) + 0:8 y4 (t)

Chapter 2
Dierential Equations for Continuous-Time Systems

Dierential equations for ontinuous-time systems


Example:
d2 y + 3x(t) dy + y(t) 2x(t) = 0
dt2 dt
Many physi al omponents have mathemati al models that involve integral and
dierential relationships between signals:

iL (t) L iC (t) C
b b b b

+ vL (t) − + vC (t) −

Ideal indu tor: Ideal apa itor:

di (t) dvC (t)


vL (t) = L L iC (t) = C
dt dt
Chapter 2
Dierential Equations for Continuous-Time Systems

Example 2.4

R
Dierential equation for simple RC b b b

ir uit + +

Find a dierential equation to des ribe x (t) i (t) C y (t)

the input-output relationship for the − −


b b

rst-order RC ir uit shown.

Solution:

vR (t) = R i (t) and i (t) = C dy (t)


We know that

dt
Use KVL to obtain

dy (t) dy (t) 1 y (t) = 1 x (t)


RC
dt
+ y (t) = x (t) ) dt
+ RC RC

Chapter 2
Dierential Equations for Continuous-Time Systems

Example 2.5

R1
Another RC ir uit b

+
Find a dierential equation to des ribe
+
x (t) − i1 (t) R2 i2 (t) C y (t)
the input-output relationship for the

rst-order RC ir uit shown. b

Solution:

Apply KVL:
x (t) + R1 i1 (t) + R2 [i1 (t) i2 (t)℄ = 0
R2 [i2 (t) i1 (t)℄ + y (t) = 0
dy (t) dy (t) 1
i2 (t) = C ; i1 (t) = C + R2 y (t)
dt dt
dy (t) R1 + R2
x (t) + R1 C y (t) = 0
dt R2
Rearrange terms
dy (t) + R1 + R2 y (t) = 1 x (t)
dt R1 R2 C R1 C
Chapter 2
Dierential Equations for Continuous-Time Systems

Example 2.6

R iL (t) L
Dierential equation for RLC ir uit + v (t) − +
L
Find a dierential equation to des ribe
+
x (t) − i (t) C y (t)
the input-output relationship for the

RLC ir uit shown.

Solution:

Apply KVL:
x (t) + R i (t) + vL (t) + y (t) = 0

i (t) = C dy (t) ; vL (t) = L di (t) = LC d dty 2(t)


2

dt dt

x (t) + RC dy (t) + LC d y 2(t) + y (t) = 0


2

dt dt
Rearrange terms:

d2 y (t) + R dy (t) + 1 y (t) = 1 x (t)


dt2 L dt LC LC

Chapter 2
Constant-Coe ient Ordinary Dierential Equations

Constant- oe ient ordinary dierential equations


General onstant- oe ient dierential equation for a CTLTI system:

aN d yN(t) +aN dN 1 y (t) + : : : + a dy (t) + a y (t) =


N
dt 1
dtN 1 1
dt 0

dM x (t) dM 1 x (t)
bM
dtM
+ bM 1
dtM 1
+ : : : + b1 dxdt(t) + b0 x (t)

Constant- oe ient ordinary dierential equation in losed summation form

N M
X dk y (t) X dk x (t)
ak
dtk
= bk
dtk
k=0 k=0
Initial onditions:

dy (t) dN 1 y (t)
y (t0 ) ; ; :::;
dt t=t0 dtN 1 t=t0
Chapter 2
Constant-Coe ient Ordinary Dierential Equations

Example 2.7

Che king linearity and time-invarian e of a dierential equation

Determine whether the rst-order onstant- oe ient dierential equation

dy (t) + a y (t) = b x (t)


0 0
dt
represents a CTLTI system.

Solution:

Let input signals x1 (t) and x2 (t) produ e the responses y1 (t) and y2 (t) respe tively:

dy1 (t) dy2 (t)


dt
+ a0 y1 (t) = b0 x1 (t) and
dt
+ a0 y2 (t) = b0 x2 (t)
Constru t a new input signal

x3 (t) = 1 x1 (t) + 2 x2 (t)


For linearity we need
y3 (t) = 1 y1 (t) + 2 y2 (t)

Chapter 2
Constant-Coe ient Ordinary Dierential Equations

Example 2.7 ( ontinued)

dy3 (t) + a y (t) = b x (t)


It an be shown that

0 3 0 3
dt
Is this su ient?

What happens at t = t0 , the time instant at whi h the initial onditions are spe ied?

Suppose the initial value of y (t) is given as y (t0 ) = y0 . We must have

y1 (t0 ) = y0 ; y2 (t0 ) = y0 ; y3 (t0 ) = y0


but we also need
y3 (t0 ) = 1 y1 (t0 ) + 2 y2 (t0 )

For linearity: y0 = 0.
Che k for time-invarian e:

dy (t  ) + a y (t  ) = b x (t  )
0 0
dt
The system is time-invariant.
Chapter 2
Constant-Coe ient Ordinary Dierential Equations

Constant- oe ient ordinary dierential equations ( ontinued)

Constant- oe ient dierential equation for a CTLTI system

The dierential equation

N M
ak d y k(t) bk d xk(t)
X k X k
dt
= dt
k=0 k=0
represents a CTLTI system provided that all initial onditions are equal to zero:

y (t0 ) = 0 ; dy (t) = 0 ; :::; dN 1 y (t) =0


dt t=t0 dtN 1 t=t0
It is typi al, but not required, to have t0 = 0.

Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Solution of the rst-order dierential equation

Solution of the rst-order dierential equation

The dierential equation

dy (t) + y (t) = r (t) ; y (t0 ) : spe ied


dt
is solved as ˆ t
y (t) = e ( t t0 ) y (t0 ) + e ( t  ) r ( ) d
t0

Even though this result is only appli able to a rst-order dierential equation, it is also
useful for working with higher order systems through the use of state-spa e models.
Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Example 2.8

Unit-step response of the simple RC ir uit

For the RC ir uit shown, assume the initial value of the output at time t = 0 is
y (0) = 0. Determine the response of the system to a unit-step fun tion, i.e.,
x (t) = u (t).

R=1 Ω
b b b
x(t) = u(t)
+ +
1
x (t) C = 1/4 F y (t)

− b b
− t

Solution:
dy (t) + 4 y (t) = 4 u (t)
dt
ˆ t ˆ t
y (t) = e 4( t  ) 4 u (t) d = 4e 4 t e4  d =1 e 4t for t  0
0 0

Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Example 2.8 ( ontinued)
In ompa t form: 
replacemen
y (t) = 1 e 4t u (t)

1
0.8
0.6
y(t)

0.4
0.2
0
−0.2
−1 −0.5 0 0.5 1 1.5
t (sec)
Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Example 2.9

Pulse response of the simple RC ir uit

Determine the response of the RC ir uit shown to a re tangular pulse signal

x (t) = A  (t=w)

x (t) = A Π (t/w)
R=1Ω
b b b

+ +

x(t) C = 1/4 F y(t) A

− − t
b b −w/2 w/2

Solution:

Dierential equation:
dy (t) + 4 y (t) = 4A  (t=w)
dt
Initial value: y ( w=2) = 0.

Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Example 2.9 ( ontinued)
Output signal:
ˆ t
y (t) = e 4( t  ) 4A  (=w) d
w=2
w <t w
Case 1:
2 2 ˆ t  
y (t) = 4A e 4t e4 d = A 1 e 2w e 4t
w=2
t> w
Case 2:
2 ˆ w=2
y (t) = 4A e 4t e4 d = Ae 4 t e2w e 2w

w=2
Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Example 2.9 ( ontinued)
Complete response:
8   w w
< A 1 e 2w e 4t ;
2 w< t  2
y (t) =  
: A e 4t e2w e 2w ; t>
replacemen
2
The signal y (t) is shown for A = 1 and w = 1.

1
0.8
0.6
y(t)

0.4
0.2
0
−0.2
−1 −0.5 0 0.5 1 1.5
t (sec)

Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Example 2.10

Pulse response of the simple RC ir uit revisited

Rework the problem in Example 2.9 by making use of the unit-step response found in
Example 2.8 along with linearity and time-invarian e properties of the RC ir uit.

Solution: Express the pulse signal as the dieren e of two unit-step signals:
  
x (t) = A  (t=w) = A u t + w Au t w
2 2
A u (t + w/2)
A
(a)

t x (t) = A [u (t + w/2) − u (t − w/2)]


w
− A
2 (c)

A u (t − w/2)
t
w w
(b) A −
2 2

t
w
2
Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Example 2.10 ( ontinued)

x1 (t) = A u (t + w/2) y1 (t) = A Sys {u (t + w/2)}

A A

t t
−w/2 −w/2
(a) (b)

x2 (t) = A u (t − w/2) y2 (t) = A Sys {u (t − w/2)}

A
A

t t
w/2 w/2
(c) (d)

x1 (t) − x2 (t) y1 (t) − y2 (t)

A A

t t
−w/2 w/2 −w/2 w/2
(e) (f)

Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Example 2.10 ( ontinued)
Unit-step response: 
Sys fu (t)g = 1 e 4t u (t)
Response to the pulse input:
n  o n 
Sys fx (t)g = A Sys u t+ w A Sys u t w o
2 2
  
Sys fx (t)g = A 1

e t w=2)  u t + w
4( +
A

1 e 4( t w=2)  u t w
2 2
MATLAB Exer ise 2.3
Chapter 2
Solving Dierential Equations
Solution of the rst-order dierential equation
Intera tive demo: r _demo1.m
Experiment with the superposition prin iple by varying the ir uit parameters R and C
as well as the pulse width w.

Chapter 2
Solving Dierential Equations
Solution of the general dierential equation
Solution of the general dierential equation

N M
ak d y k(t) bk d xk(t)
X k X k
dt
= dt
k=0 k=0
Initial onditions:

y (t0 ) ; dy (t) dN 1 y (t)


; :::;
dt t=t0 dtN 1 t=t0
General solution:
y (t) = yh (t) + yp (t)
yh (t) is the homogeneous solution of the dierential equation (natural response).
yp (t) is the parti ular solution of the dierential equation.
y (t) = yh (t) + yp (t) is the for ed solution of the dierential equation (for ed
response).
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Finding the natural response of a ontinuous-time system
Homogeneous dierential equation:

N
ak d y k(t)
X k
dt
=0
k=0

First-order homogeneous dierential equation:

dy (t)
dt
+ y (t) = 0
Solution:
y (t) = e t
The onstant must be determined based on the desired initial value of y (t) at t = t0 .

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.11

Natural response of the simple RC ir uit

Consider the RC ir uit shown. Element values are R=1 and C = 1=4 F. Input
terminals of the ir uit are onne ted to a battery that supplies the ir uit with an
input voltage of 5 V up to the time instant t = 0. The swit h is moved from position
A to position B at t = 0 ensuring that x (t) = 0 for t  0. Find the output signal as a
fun tion of time.

A
b R A
b R
b
+ b
+
+ B b
+ B b
t=0
5V y (t) 5V + y (t)
C i (t) C
− − x (t) = 0
− − −

Solution:

Homogeneous dierential equation:

dy (t) + 4 y (t) = 0
dt
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.11 ( ontinued)
Homogeneous solution is of the form:

yh (t) = e st = e 4t ; for t  0
Satisfy initial value:
yh (0) = e 4(0)
= =5
Natural response:
yh (t) = 5 e 4t ; for t  0
In ompa t form:
yh (t) = 5 e 4t u (t)

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.11 ( ontinued)

yh (t) = 5 e 4t u (t)

4
yh (t)

0 0.5 1 1.5
Time (sec)
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.12

Changing the start time in Example 2.11

Rework the problem in Example 2.11 with one minor hange: The initial value of the
output signal is spe ied at the time instant t= 0:5 se onds instead of at t = 0, and
its value is y ( 0:5) = 10.
A
b R A
b R
b
+ b
+
+ B b
+ B b

t = −0.5
10 V y (t) 10 V + y (t)
C i (t) C
− − x (t) = 0
− − −

Solution:

General form of the homogeneous solution:

yh (t) = e 4t
To satisfy yh ( 0:5) = 10:
yh ( 0:5) = e :
4( 0 5)
= e2 = 10 ) = 10
e2
= 1:3534

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.12 ( ontinued)
Homogeneous solution is

yh (t) = 1:3534 e 4t ; for t  0:5


In ompa t form:
yh (t) = 1:3534 e 4t u (t + 0:5)

10

6
yh (t)

2
1.3534
0

−0.5 0 0.5 1
Time (sec)
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Finding the natural response of a ontinuous-time system ( ontinued)
General homogeneous dierential equation:

N
ak d y k(t)
X k
dt
=0
k=0

Chara teristi equation

N
X
ak s k = 0
k=0

To obtain the hara teristi equation, substitute:

dk y (t)
dtk
! sk

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Finding the natural response of a ontinuous-time system ( ontinued)
Write the hara teristi equation in open form:

aN sN + aN 1 sN 1
+ : : : + a 1 s + a0 = 0
In fa tored form:
aN (s s1 ) (s s2 ) : : : (s sN ) = 0
Homogeneous solution (assuming roots are distin t):

N
X
yh (t) = 1e
s1 t + 2e
s 2 t + : : : + N es N t = k es k t
k=1

Unknown oe ients 1 ; 2; : : : ; N are determined from the initial onditions.

Terms esk t are alled the modes of the system.


Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.13

R
Time onstant on ept b b b

+ +
Explore the natural response of the RC
ir uit as a fun tion of ir uit x (t) i (t) C y (t)
parameters and the initial voltage of the − −
b b

apa itor.

Solution:

The hara teristi equation is s+ 1 =0


RC
If y (0) = V0 , the natural response is yh (t) = V0 e t=RC u (t)

yh (t)
Dene the time onstant as
 = RC , so that V0
Slope = −1/τ

yh (t) = V0 e t= u (t) V0


e

τ t

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Intera tive demo: r _demo2.m
Experiment by varying the ir uit parameters R and C as well as the initial voltage V0 .
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.14

Natural response of se ond-order system


R iL (t) L
For the RLC ir uit let the element
values be R = 5 , L = 1 H and + v (t) − +
C = 1=6 F. Initial values are i (0) = 2 A
L
+

and y (0) = 1:5 V . No external input


x (t) − i (t) C y (t)

signal is applied to the ir uit, therefore


x (t) = 0. Determine the output voltage


y (t).
Solution:

Homogeneous dierential equation:

d2 y (t) + 5 dy (t) + 6 y (t) = 0


dt2 dt
Chara teristi equation:

s2 + 5s + 6 = 0 ) s1 = 2; s2 = 3
Homogeneous solution:

yh (t) = 1 e 2t + 2 e 3t for t  0

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.14 ( ontinued)
Evaluate yh (t) for t = 0:
yh (0) = 1 e 2(0)
+ 2 e 3(0)
= 1 + 2 = 1:5
Use the initial value of the indu tor urrent:

i (0) = C dyh (t) =2 ) dyh (t) = i C(0) = 12=6 = 12


dt t=0 dt t=0

Dierentiate the homogeneous solution found:

dyh (t)  t
dt t=0
= 2 1e 2t 3 2e 3
= 2 1 3 2 = 12
t=0

Solve for 1 and 2:


1 = 16:5 ; and 2 = 15
Natural response:
yh (t) = 16:5 e 2t 15 e 3t; t0
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.14 ( ontinued)

yh (t) = 16:5 e 2t 15 e t; t0


replacemen 3

2
yh (t)

−1
0 0.5 1 1.5 2 2.5 3
Time (sec)

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Roots of hara teristi polynomial
Case 1: All roots are distin t and real-valued.

Homogeneous solution:
N
X
yh (t) = k es k t
k=1

sk < 0 ) De aying exponential sk > 0 ) Growing exponential


ck esk t ck esk t
sk < 0 sk > 0

t t
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Roots of hara teristi polynomial ( ontinued)
Case 2: Chara teristi polynomial has omplex-valued roots.

Sin e the oe ients of the hara teristi polynomial are real-valued, any omplex
roots must appear in the form of onjugate pairs.

Part of the homogeneous solution that is due to a onjugate pair of roots:

yh1 (t) = 1a es1a t + 1b es1b t


= 1a e(1 +j!1)t + 1 b e(1 j!1 )t

Coe ients 1 a and 1 b must form a omplex onjugate pair as well.

1a = j 1 j ej1 and 1 b = j 1j e j1

yh1 (t) = 2 j 1 j e1 t os (!1 t + 1 )


Using the appropriate trigonometri identity:

yh1 (t) = d1 e1 t os (!1 t) + d2 e1 t sin(!1 t)

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Roots of hara teristi polynomial ( ontinued)

A pair of omplex onjugate roots for the hara teristi polynomial leads to a
solution omponent in the form of a osine signal multiplied by an exponential
signal.

The os illation frequen y of the osine signal is determined by !1 , the imaginary


part of the omplex roots.

The real part of the omplex roots, 1 , impa ts the amplitude of the solution. If
1 < 0, then the amplitude of the osine signal de ays exponentially over time. In
ontrast, if 1 > 0, the amplitude of the osine signal grows exponentially over
time.

yh1 (t) yh1 (t)

σk < 0 σk > 0

t t
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Roots of hara teristi polynomial ( ontinued)
Case 3: Chara teristi polynomial has some multiple roots.

aN (s s1 ) (s s2 ) : : : (s sN ) = 0
What if s2 = s1 ?
yh (t) = 11 es1 t + 12 t es1 t + other terms

A root of multipli ity r requires r terms in the homogeneous solution:


yh (t) = 11 es 1 t + 12 t es1 t + : : : + 1r tr 1
es1 t + other terms

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.15

Natural response of se ond-order system revisited

For the RLC ir uit shown, the initial indu tor urrent is i (0) = 0:5 A, and the initial
apa itor voltage is y (0) = 2 V. No external input signal is applied to the ir uit,
therefore x (t) = 0. Determine the output voltage y (t) if
a. the element values are R=2 , L = 1 H and C = 1=26 F,

b. the element values are R = 6 , L = 1 H and C = 1=9 F.

R iL (t) L

+ v (t) − +
L
+
x (t) − i (t) C y (t)

Solution:

Using spe ied initial value of the indu tor urrent:

i (0) = C dyh (t) = 0:5 ) dyh (t) = 0:5


dt t=0 dt t=0 C
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.15 ( ontinued)
a.
Homogeneous dierential equation:

d2 y (t) dy (t)
dt 2
+ 2 dt
+ 26 y (t) = 0
Chara teristi equation:

s2 + 2s + 26 = 0 ) s1 = 1 + j5 ; s2 = 1 j5
Natural response:
yh (t) = d1 e t os (5t) + d2 e t sin(5t)
Impose initial onditions:
yh (0) = d1 = 2
dyh (t)
dt t=0
= d1 + 5d2 = 13 ) d2 = 3
Natural response:

yh (t) = 2 e t os (5t) + 3 e t sin(5t) for t  0

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.15 ( ontinued)
b.
Homogeneous dierential equation:

d2 y (t)
dt2
+ 6 dydt(t) + 9 y (t) = 0
Chara teristi equation:

s2 + 6s + 9 = 0 ) (s + 3)2 = 0
Homogeneous solution:

yh (t) = 11 e 3t + 12 te 3t for t  0
Impose initial onditions:
11 =2
dyh (t)
dt t=0
= 3 11 + 12 = 4:5 ) 12 = 10:5
Natural response:
yh (t) = 2 e 3t + 10:5 te 3t for t  0
Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Example 2.15 ( ontinued)
Homogeneous solution for part (a):

2
yh (t)

−2
0 0.5 1 1.5 2 2.5 3
t (sec)

Homogeneous solution for part (b):


4

2
yh (t)

−2
0 0.5 1 1.5 2 2.5 3
t (sec)

Chapter 2
Solving Dierential Equations
Finding the natural response of a ontinuous-time system
Intera tive demo: nr_demo1.m
Experiment by varying the lo ations of the two roots s1 and s2 on the omplex plane.
Chapter 2
Solving Dierential Equations
Finding the for ed response of a ontinuous-time system
Finding the for ed response of a ontinuous-time system
Choosing a parti ular solution for various input signals

Input signal Parti ular solution


K ( onstant) k1
K eat k1 eat
K os (at) k1 os (at) + k2 sin(at)
K sin(at) k1 os (at) + k2 sin(at)
K tn kn tn + kn 1 tn 1 + ::: + k t + k
1 0

Chapter 2
Solving Dierential Equations
Finding the for ed response of a ontinuous-time system
Example 2.16

For ed response of the rst-order system for


sinusoidal input

Determine the output signal of the RC ir uit R


shown in response to a sinusoidal input signal in
b b b

+ +
the form
x (t) = A os (!t) x (t) i (t) C y (t)

with amplitude A = 20 and radian frequen y


− b b

! = 8 rad/s. The initial value of the output


signal is y (0) = 5.

Solution:

Dierential equation:
dy (t)
dt
+ 4 y (t) = 4 x (t)
Homogeneous solution is in the form

yh (t) = e 4t for t  0
Do not determine yet!
Chapter 2
Solving Dierential Equations
Finding the for ed response of a ontinuous-time system
Example 2.16 ( ontinued)
Parti ular solution is in the form

yp (t) = k1 os (!t) + k2 sin(!t)


Parti ular solution yp (t) must satisfy the dierential equation:
dyp (t)
dt
= !k1 sin(!t) + !k2 os (!t)
!k1 sin(!t) + !k2 os (!t) + 4 [k1 os (!t) + 4k2 sin(!t)℄ = A os (!t)
In ompa t form:

(4k1 + !k2 A) os (!t) + (4k2 !k1 ) sin(!t) = 0


k1 k2 :
4A
Solve for and
A!
k1 = k2 =
16 + !2 ; 16 + !2
For ed solution:

y (t) = yh (t) + yf (t) = e 4t +


4A A!
16 + !2 os (!t) + 16 + !2 sin(!t)

Chapter 2
Solving Dierential Equations
Finding the for ed response of a ontinuous-time system
Example 2.16 ( ontinued)
Using numeri al values A = 20 and ! = 8 rad/s:
y (t) = e 4t + os (8t) + 2 sin(8t)
Impose the initial ondition y (0) = 5:
y (0) = 5 = + os (0) + 2 sin(0) ) =4
Complete solution:

y (t) = 4 e 4t + os (8t) + 2 sin(8t) for t  0

y (t) = yt (t) + yss (t)


Transient omponent:

yt (t) = 4 e 4t ; lim fyt (t)g = 0


t!1
Steady-state omponent:

yss (t) = os (8t) + 2 sin(8t)


Chapter 2
Solving Dierential Equations
Finding the for ed response of a ontinuous-time system
Example 2.16 ( ontinued)

yt (t) = 4 e 4t ; yss (t) = os (8t) + 2 sin(8t)


4

2
yt (t)

−2

−4
0 0.5 1 1.5 2 2.5 3
Time (sec)

2
yss (t)

−2

−4
0 0.5 1 1.5 2 2.5 3
Time (sec)

Chapter 2
Solving Dierential Equations
Finding the for ed response of a ontinuous-time system
Example 2.16 ( ontinued)
Complete solution:

y (t) = 4 e 4t + os (8t) + 2 sin(8t) for t  0


y(t) = yt (t) + yss (t)

−2
0 0.5 1 1.5 2 2.5 3
Time (sec)
Chapter 2
Solving Dierential Equations
Finding the for ed response of a ontinuous-time system
Intera tive demo: fr_demo1.m
Experiment by varying the R and C , the radian frequen y ! and
ir uit parameters
the initial value y (0). yt (t), the
Observe the ee ts on transient response
steady-state response yss (t) and the total for ed response y (t) = yt (t) + yss (t).

Chapter 2
Blo k Diagram Representation of Continuous-Time Systems

Blo k diagram representation of ontinuous-time systems


Blo k diagrams for ontinuous-time systems are onstru ted using three types of
omponents:

Constant-gain ampliers

Signal adders

Integrators

Z t
K R
w (t) K w (t) w (t) dt w (t) dt
b t0

w1 (t) w1 (t) + w2 (t) + . . . + wL (t)


w2 (t)
..
.
wL (t)
Chapter 2
Blo k Diagram Representation of Continuous-Time Systems

Blo k diagram representation of ontinuous-time systems ( ontinued)


A third-order dierential equation:

+ a2 ddt2y + a1 dy
d3 y + a0 y = b2 ddt2x + b1 dx
2
+b x
2

dt3 dt dt 0
Use an intermediate variable w (t) in pla e of y (t) in the left side of the dierential
equation, and set the result equal to x (t):

d3 w
+ a2 ddtw2 + a1 dw
2

dt3 dt
+ a0 w = x
d3 w
a2 d w2 a1 dw
2

dt3
=x dt dt
a0 w

d3 w d2 w dw
dt3 R dt2 R dt R w (t)
x (t) dt b
dt b
dt b

−a2
−a1
−a0

Chapter 2
Blo k Diagram Representation of Continuous-Time Systems

Blo k diagram representation of ontinuous-time systems ( ontinued)


Express the signal y (t) in terms of the intermediate variable w (t):

y = b2 d w + b1 dw
2

dt2 dt
+ b0 w

b2
b1

d3 w d2 w dw
dt3 R dt2 R dt R w (t) b0
x (t) dt b
dt b
dt b
y (t)

−a2
−a1
−a0
Chapter 2
Blo k Diagram Representation of Continuous-Time Systems

Blo k diagram representation of ontinuous-time systems ( ontinued)


Imposing initial onditions:

b2
2
dw dw b1
dt2 t=t0 dt t=t0 w(t0 )
d3 w
b b b

dt3 R R R b0
x (t) dt b b b
dt b b b
dt b b b
y (t)
t = t0 t = t0 t = t0
−a2
−a1
−a0

Chapter 2
Blo k Diagram Representation of Continuous-Time Systems

Example 2.17

Blo k diagram for ontinuous-time system

Constru t a blo k diagram to solve the dierential equation

d3 y + 5 d2 y + 17 dy + 13 y = x + 2 dx
dt3 dt2 dt dt
with the input signal x (t) = os (20t) and subje t to initial onditions

y (0) = 1 ; dy d2 y
dt t=0
=2; dt2 t=0
= 4;

Solution:

Using the intermediate variable w (t):


d3 w d2 w dw dw
dt 3
+ 5 dt 2
+ 17 dt
+ 13 w = x and y =w+2
dt
Chapter 2
Blo k Diagram Representation of Continuous-Time Systems

Example 2.17 ( ontinued)


Initial onditions spe ied in terms of the values of y , dy=dt and d2 y=dt2 at t = 0
need to be expressed in terms of the integrator outputs w, dw=dt and d2 w=dt2 at
t = 0.
w (0) = 71 dw = 58 d2 w = 16
45 ; dt t=0 45 ; dt2 t=0 45

2
16/45 58/45 −71/45
b b b

R R R 1
x (t) dt b b b
dt b b b
dt b b b
y (t)
t=0 t=0 t=0
−5
−17
−13

Chapter 2
Impulse Response and Convolution

Impulse response

h (t) = Sys fÆ (t)g δ (t) Sys{..} h (t)

For a CTLTI system: The impulse response also onstitutes a omplete des ription of
the system.

Finding the impulse response of a CTLTI system from the dierential equation

1. Use a unit-step fun tion for the input signal, and ompute the for ed response of
the system, i.e., the unit-step response.

2. Dierentiate the unit-step response of the system to obtain the impulse response,
i.e.,

h (t) = dy (t)
dt
n
Sys fÆ (t)g = Sys du (t) o = d h Sys fu (t)gi
dt dt
Chapter 2
Impulse Response and Convolution

Example 2.18

Impulse response of the simple RC ir uit


R
Determine the impulse response of the b b b

+ +
rst-order RC ir uit shown. Assume the
system is initially relaxed, that is, there is no x (t) i (t) C y (t)
initial energy stored in the system. (Re all − −
b b

that this is a ne essary ondition for the


system to be CTLTI.)

Solution: Dierential equation is

dy (t)
dt
+ 4 y (t) = 4 x (t)
Using the rst-order solution method:

ˆ t
h (t) = e 4( t  ) 4 Æ ( ) d
0

Using the sifting property of the unit-impulse fun tion:

h (t) = 4 e 4t u (t)

Chapter 2
Impulse Response and Convolution

Example 2.18 ( ontinued)


Using the the more general method that relies on the unit step response:

y (t) = Sys fu (t)g = 1 e 4t u (t)
Dierentiating y (t):

h (t) = dy (t)
  
dt
= dtd 1 e 4t u (t) = 4 e 4t u (t)

s
5

3
h(t)

−1 −0.5 0 0.5 1 1.5


t (sec)
Chapter 2
Impulse Response and Convolution

Example 2.19

R iL (t) L
Impulse response of a se ond-order system
+ v (t) − +
Determine the impulse response of the RLC L

R=2
+
ir uit shown. Use element values , x (t) − i (t) C y(
L = 1 H and C = 1=26 F. −

Solution:

Dierential equation:
d2 y (t) + 2 dy (t) + 26 y (t) = 0
dt2 dt
The homogeneous solution is (see Example 2.15)

yh (t) = d1 e t os (5t) + d2 e t sin(5t)


To nd the unit-step response, start with the parti ular solution

yp (t) = k1

Chapter 2
Impulse Response and Convolution

Example 2.19 ( ontinued)


Parti ular solution must satisfy the dierential equation, therefore k1 = 1, and the
omplete solution is

y (t) =yh (t) + yp (t)


=d1 e t os (5t) + d2 e t sin(5t) + 1
The system is CTLTI, and is therefore initially relaxed.

y (0) = d1 + 1 = 0 ) d1 = 1
dyh (t)
dt t=0
=0 ) d1 + 5d2 = 0 ) d2 = 0:2
s Unit-step response is

y (t) = yh (t) + yp (t) = e t os (5t) (0:2) e t sin(5t) + 1 for t  0

Impulse response is

dy (t)
h (t) = = 5:2 e t sin(5t) for t  0
dt
Chapter 2
Impulse Response and Convolution

Example 2.19 ( ontinued)

h (t) = dy (t) = 5:2 e t sin(5t) for t  0


dt

2
h(t)

−2

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5


t (sec)

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Convolution operation for CTLTI systems
The output signal y (t) of a CTLTI system is equal to the onvolution of its impulse
response h (t) with the input signal x (t).

Continuous-time onvolution

1
y (t) =x (t)  h (t) = x () h (t ) d
ˆ

1
1
=h (t)  x (t) = h () x (t ) d
ˆ

1
Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Convolution operation for CTLTI systems ( ontinued)

Steps involved in omputing the onvolution of two signals

To ompute the onvolution of x (t) and h (t) at a spe i time-instant t:


1. Sket h the signal x () as a fun tion of the independent variable . This
orresponds to a simple name hange on the independent variable, and the graph
of the signalx () appears identi al to the graph of the signal x (t).
2. For one spe i value of t, sket h the signal h (t ) as a fun tion of the
independent variable . This task an be broken down into two steps as follows:
2a. Sket h h ( ) as a fun tion of . This step amounts to time-reversal of h ().
2b. In h () substitute  !  t. This step yields
h ( ) = h (t )
 ! t
and amounts to time-shifting h ( ) by t.
3. Multiply the two signals in 1 and 2 to obtain f () = x () h (t ).
4. Compute the area under the produ t f () = x () h (t ) by integrating it
over the independent variable . The result is the value of the output signal at
the spe i time instant t.
5. Repeat steps 1 through 4 for all values of t that are of interest.

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Convolution operation for CTLTI systems ( ontinued)

x (t) x (τ )

t→τ

t τ

h (t) h (λ)

t→λ
Name change
t λ

−λ
λ→ l
rsa
eve
i mer
h (−λ) T h (t − λ)

λ→λ−t

Time shift
λ λ
t
Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.20

R
Unit-step response of RC ir uit revisited b b b

+ +
Compute the unit-step response of the
x (t) i (t) C y (t)
simple RC ir uit using the onvolution
− −
operation. b b

Solution:

Impulse response of the RC ir uit is

h (t) =
1 e t=RC u (t)
RC
Output of the system in response to input x (t):
1
y (t) = x () h (t ) d
ˆ

1
Fun tions needed: x () and h (t ).

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.20 ( ontinued)

Case 1: t ≤ 0 Case 2: t > 0


x (λ) x (λ)

λ λ

h (t − λ) h (t − λ)

λ λ
t t

x (λ) h (t − λ) x (λ) h (t − λ)

λ λ
t
Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.20 ( ontinued)
Case 1: t0
Fun tions x () and h (t ) do not overlap anywhere. Therefore

y (t) = 0; for t  0
Case 2: t>0
Fun tions x () and h (t ) overlap for values of  in the interval (0; t).
In this interval x () = 1 and h (t ) =
1 e (t )=RC . Therefore
RC
y (t) =
ˆ t
1 e (t )=RC d = 1 e t=RC ; for t > 0
0 RC

Combine the two ases through the use of a unit-step fun tion:

y (t) = 1 e t=RC u (t)

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Intera tive demo: onv_demo1.m

Vary t and observe the waveforms and their overlaps.


Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.21

R
Pulse response of RC ir uit revisited b b b

+ +
Using onvolution, determine the response
x (t) i (t) C y (t)
of the RC ir uit to a unit-pulse input signal
x (t) =  (t). − b b

Solution:

It is useful to sket h the fun tions involved in the onvolution integral, namely x ()
and h (t ). Three distin tly dierent possibilities for the time variable t will be
onsidered.

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.21 ( ontinued)

1 1 1 1
Case 1: t ≤ − Case 2: − < t ≤ Case 3: t >
2 2 2 2
x (λ) x (λ) x (λ)

λ λ λ
1 1 1 1 1 1
− − −
2 2 2 2 2 2

h (t − λ) h (t − λ) h (t − λ)

λ λ λ
t t t

x (λ) h (t − λ) x (λ) h (t − λ) x (λ) h (t − λ)

λ λ λ
1 1 1
− t −
2 2 2
Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.21 ( ontinued)
Case 1: t 1
2

Fun tions x () and h (t ) do not overlap. Therefore

y (t) = 0 ; for t 
1
2
Case 2:
1
2
<t 1
2

Fun tions x () and h (t ) overlap in the range


1
2
<   t. Therefore

y (t) =
ˆ t
1 e (t )=RC d = 1

e (t+1=2)=RC ; for
1 <t 1
1 2 = RC 2 2
Case 3: t> 1
2

Fun tions x () and h (t ) overlap in the range


1
2
< 1
2
. Therefore

y (t) =
ˆ 1=2
1 e (t )=RC d = e t=RC e1=2RC

e 1=2RC ; for t > 1
1=2 RC 2

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.21 ( ontinued)

8
>
<
0; t 1
2

y (t) = 1 e (t+1=2)=RC ; 1
2
<t 1
2
>
: 
e t=RC e1=2RC e 1=2RC ; t> 1
2

y (t)

1 − e−1/RC

t
1 1

2 2
Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Intera tive demo: onv_demo2.m

Vary t and observe the waveforms and their overlaps.

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.22

A more involved onvolution problem

Impulse response of a CTLTI system is h(t) = e t [u (t) u (t 2)℄. The input


signal is
(
1; 0t<1
x (t) =  (t 0:5)  (t 1:5) = 1; 1t<2
0; otherwise
Determine the output signal y (t) using onvolution.

Solution: Fun tions involved in the onvolution integral are:

x (λ) h (t − λ)

λ λ
1 2 t−2 t

−1
Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.22 ( ontinued)

Case 1: t ≤ 0 Case 2: 0 < t ≤ 1 Case 3: 1 < t ≤ 2


x (λ) x (λ) x (λ)

1 1 1

2 2 2
λ λ λ
1 1 1

−1 −1 −1

h (t − λ) h (t − λ) h (t − λ)

λ λ λ
t t t−2 t

x (λ) h (t − λ) x (λ) h (t − λ) x (λ) h (t − λ)

t
λ λ λ
t

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.22 ( ontinued)

Case 4: 2 < t ≤ 3 Case 5: 3 < t ≤ 4 Case 6: t > 4


x (λ) x (λ) x (λ)

1 1 1

2 2 2
λ λ λ
1 1 1

−1 −1 −1

h (t − λ) h (t − λ) h (t − λ)

λ λ λ
t−2 t t−2 t−2

x (λ) h (t − λ) x (λ) h (t − λ) x (λ) h (t − λ)

t−2
λ λ λ
Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.22 ( ontinued)
Case 1: t0
Fun tions x () and h (t ) do not overlap. Therefore

y (t) = 0 ; for t  0
Case 2: 0<t1
Fun tions x () and h (t ) overlap for 0 <   t. Therefore
ˆ t
y (t) = (1) e ( t ) d = 1 e t ; for 0<t1
0

Case 3: 1<t2
Fun tions x () and h (t ) overlap for 0 <   t. Therefore
1 ˆ t
y (t) = (1) e t ) d + ( 1) e t ) d
ˆ
( (
0 1

= 1 + 4:4366 e t; for 1<t2

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.22 ( ontinued)
Case 4: 2<t3
Fun tions x () and h (t ) overlap for t 2 <   2. Therefore
1 2
y (t) = (1) e t ) d + ( 1) e t ) d
ˆ ˆ
( (
t 2 1

= 0:1353 1:9525 e t; for 2<t3


Case 5: 3<t4
Fun tions x () and h (t ) overlap for t 2 <   2. Therefore
2
y (t) = ( 1) e t ) d = 0:1353 7:3891 e t; 3<t4
ˆ
(
for
t 2

Case 6: t>4
Fun tions x () and h (t ) do not overlap. Therefore

y (t) = 0 ; for t > 4


Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.22 ( ontinued)
In ompa t form:
8
>
>
0; t < 0 or t > 4
>
>
< 1 e t; 0<t1
y (t) = 1 + 4:4366 e t ; 1<t2
>
>
>
>
:
0:1353 1:9525 e t ; 2<t3
0:1353 7:3891 e t ; 3<t4

y (t)

0.6321

t
1 2 3 4

−0.3996

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Intera tive demo: onv_demo3.m

Vary t and observe the waveforms and their overlaps.


Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.23

Case 1: t ≤ 0 Case 2: t > 0

Using alternative form of h (γ) h (γ)

onvolution

Find the unit-step response of


the RC ir uit with impulse γ γ

response

h (t) = 1 e t=RC u (t)


x (t − γ) x (t − γ)

RC
using the alternative form of
γ γ
the onvolution integral. t t

h (γ) x (t − γ) h (γ) x (t − γ)
Solution:

ˆ t
y (t) = h ( ) x (t )d
0 γ γ
t

Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Example 2.23 ( ontinued)
For t  0 the two fun tions do not overlap. Therefore

y (t) = 0 ; for t  0

For t > 0, the two fun tions h( ) and x (t ) overlap in the interval (0; t).
1
Therefore ˆ t
y (t) = e =RC d =1 e t=RC ; for t > 0
0 RC
In ompa t form: 
y (t) = 1 e t=RC u (t)
Chapter 2
Impulse Response and Convolution
Convolution operation for CTLTI systems
Intera tive demo: onv_demo4.m

Vary t and observe the waveforms and their overlaps.

Chapter 2
Causality in Continuous-Time Systems

Causality in ontinuous-time systems

Causal system

A system is said to be ausal if the urrent value of the output signal depends only on
urrent and past values of the input signal, but not on its future values.

CTLTI system:
1
y (t) = h (t)  x (t) = h () x (t ) d
ˆ

1
For  < 0, the term x (t ) refers to future values of the input signal.

Causality in CTLTI systems

For a CTLTI system to be ausal, the impulse response of the system must be equal
to zero for all negative values of its argument.

h (t) = 0 for all t < 0


Chapter 2
Stability in Continuous-Time Systems

Stability in ontinuous-time systems

Stable system

A system is said to be stable in the bounded-input bounded-output (BIBO) sense if


any bounded input signal is guaranteed to produ e a bounded output signal.

x (t) < Bx < 1 implies that y (t) < By < 1

CTLTI system:
1
y (t) = h (t)  x (t) = h () x (t ) d
ˆ

Stability in CTLTI systems

For a CTLTI system to be stable, its impulse response must be absolute integrable.

1
h () d < 1
ˆ

Chapter 2
Stability in Continuous-Time Systems

Example 2.24

Stability of a rst-order ontinuous-time system

Evaluate the stability of the rst-order CTLTI system des ribed by the dierential
equation
dy (t) + a y (t) = x (t)
dt
where a is a real-valued onstant.

Solution:

Impulse response:
h (t) = e at u (t)
Che k for stability:

1 ˆ 1
h () d = e a d = 1 provided that a > 0
ˆ

1 0 a

The system is stable if a > 0.


Chapter 2
Approximate Numeri al Solution of a Dierential Equation

Approximate numeri al solution of a dierential equation


First-order linear dierential equation:

dy (t) + 1 y (t) = 1 x (t)


dt RC RC
Rearrange terms:
dy (t) 1 y (t) + 1 x (t)
dt
= RC RC
General form:

dy (t) = g [t; y (t)℄ where g [t; y (t)℄ = 1 y (t) + 1 x (t)


dt RC RC
dy (t)
y (t) dt
Approximate the derivative t=t0

dy (t)
 y (t0 + TT) y (t0 ) ;
dy (t)
y (t0 +T ) Approx.
dt
dt t=t0 y (t0 ) t=t0

T : Small step size


t
t0 t0 +T

Chapter 2
Approximate Numeri al Solution of a Dierential Equation

Approximate numeri al solution of a dierential equation ( ontinued)

y (t0 + T ) y (t0 )
T
 g [t0 ; y (t0 )℄ ) y (t0 + T )  y (t0 ) + T g [t0 ; y (t0 )℄

For the RC ir uit, using t0 = 0:


y (T )  y (0) + T g [0; y (0)℄
h
= y (0) + T 1 y (0) + 1 x (0)i
RC RC
and

y (2T )  y (T ) + T g [T; y (T )℄
h
= y (T ) + T 1 y (T ) + 1 x (T )i
RC RC
This is known as the Euler method. More sophisti ated methods exist with better
a ura y.
MATLAB Exer ise 2.4 MATLAB Exer ise 2.5
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.1

Testing linearity of ontinuous-time systems

Simulate the four systems onsidered in Example 2.1, and test them using signals
generated in MATLAB.

Solution:

If a system is linear

x (t) = 1 x1 (t) + 2 x2 (t) ) y (t) = 1 y1 (t) + 2 y2 (t)


x1 (t), x2 (t): Arbitrary signals
1, 2 : Arbitrary onstants

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.1 ( ontinued)


Create test signals:

>> t = [0:0.01:5];
>> x1 = cos(2*pi*5*t);
>> x2 = exp( 0.5*t);

Constru t and graph x (t) with 1 = 2 and 2 = 1:25:


>> alpha1 = 2;
>> alpha2 = 1.25;
>> x = alpha1*x1+alpha2*x2;
>> plot(t,x);

Simulate the rst system:

>> sys_a = @(x) 5*x;


>> y1 = sys_a(x1);
>> y2 = sys_a(x2);
>> y_exp = alpha1*y1+alpha2*y2; % Expected output if system is linear
>> y_act = sys_a(x); % Actual output
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.1 ( ontinued)


Complete s ript:

1 % Script: matex_2_1.m
2 %
3 t = [0:0.01:4]; % Create a time vector.
4 x1 = cos(2*pi*5*t); % Test signal 1.
5 x2 = exp( 0.5*t); % Test signal 2.
6 alpha1 = 2; % Set parameters alpha1
7 alpha2 = 1.25; % and alpha2.
8 x = alpha1*x1+alpha2*x2; % Combined signal.
9 % Define anonymous functions for the systems in Example 2.1.
10 sys_a = @(x) 5*x;
11 sys_b = @(x) 5*x+3;
12 sys_c = @(x) 3*x.*x;
13 sys_d = @(x) cos(x);
14 % Test the system in part (a) of Example 2.1.
15 y1 = sys_a(x1);
16 y2 = sys_a(x2);
17 y_exp = alpha1*y1+alpha2*y2; % Expected response for a linear system.
18 y_act = sys_a(x); % Actual response.
19 clf; % Clear figure.

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.1 ( ontinued)


S ript  matex_2_1.m ontinued:

20 subplot(1,2,1);
21 plot(t,y_exp); % Graph expected response.
22 title('y_{exp} = \alpha_1 y_1 + \alpha_2 y_2')
23 xlabel('t (sec)'); ylabel('Amplitude');
24 subplot(1,2,2);
25 plot(t,y_act); % Graph actual response.
26 title('y_{act} = Sys_a\{\alpha_1 x_1 + \alpha_2 x_2\}')
27 xlabel('t (sec)'); ylabel('Amplitude');
Example 2.1
yexp = α1 y1 + α2 y2 yact = Sysa {α1 x1 + α2 x2 }
20 20

15 15

10 10
Amplitude

Amplitude

5 5

0 0

−5 −5

−10 −10
0 1 2 3 4 0 1 2 3 4
t (sec) t (sec)
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.2

Testing time-invarian e of ontinuous-time systems

Simulate the three systems onsidered in Example 2.2, and test them using signals
generated in MATLAB.

Solution:

If the system under onsideration is time-invariant we need

Sys fx (t)g = y (t) ) Sys fx (t  )g = y (t  )


for any arbitrary time shift .
Create and graph the test signal x (t) = e 0:5t u (t) and its time shifted version:
>> t = [0:0.01:10];
>> x = @(t) exp( 0.5*t).*(t>=0);
>> plot(t,x(t),t,x(t 2));

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.2 ( ontinued)


Simulate the system:

>> sys_c = @(x) 3*cos(t).*x;


>> y1 = sys_c(x(t));
>> y2 = sys_c(x(t 2));
>> plot(t,y1,'b ',t,y2,'r:');

Complete s ript:

1 % Script matex_2_2.m
2 %
3 t = [0:0.01:10]; % Create a time vector.
4 x = @(t) exp( 0.5*t).*(t>=0); % Anonymous function for test signal.
5 % Define anonymous functions for the systems in Example 2 2.
6 sys_a = @(x) 5*x;
7 sys_b = @(x) 3*cos(x);
8 sys_c = @(x) 3*cos(t).*x;
9 % Test the system in part (c) of Example 2.2.
10 y1 = sys_c(x(t));
11 y2 = sys_c(x(t 2));
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.2 ( ontinued)


S ript  matex_2_2.m ontinued:

12 clf; % Clear figure.


13 plot(t,y1,'b ',t,y2,'r:'); % Graph the two responses.
14 title('Responses to x(t) and x(t 2)')
15 xlabel('t (sec)');
16 ylabel('Amplitude');
17 legend('Sys\{x(t)\}','Sys\{x(t 2)\}');

Responses to x(t) and x(t − 2)


3
Sys {x(t)}
2 Sys {x(t − 2)}
Amplitude

1 Example 2.2
0

−1

−2
0 1 2 3 4 5 6 7 8 9 10
t (sec)

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.3

Using linearity to determine the response of the RC ir uit

The response of the simple RC ir uit to a unit-step signal was found in Example 2.8
to be 
yu (t) = Sys fu (t)g = 1 e 4t u (t)
Using superposition, ompute and graph the response of the ir uit to the signal x2 (t)
shown.

R=1 Ω x2 (t)
b b b

+ + 1
x (t) C = 1/4 F y (t)
t
1 2
− b b

−1

Solution:

Dene an anonymous fun tion to ompute yu (t):


yu = @(t) (1 exp( 4*t)).*(t>=0);
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.3 ( ontinued)


Express the signal x2 (t) through unit-step fun tions:

x2 (t) = u (t) 2 u (t 1) + u (t 2)
Complete s ript:

1 % Script: matex_2_3b.m
2 %
3 % Anonymous function for unit step response.
4 yu = @(t) (1 exp( 4*t)).*(t>=0);
5 t = [ 5:0.01:5]; % Vector of time instants.
6 y2 = yu(t) 2*yu(t 1)+yu(t 2); % Compute response to x2(t)].
7 plot(t,y2);

Example 2.10

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.4

Numeri al solution of the RC ir uit using Euler method

Use the Euler method to nd an approximate numeri al solution for the RC ir uit
problem of Example 2.8, and ompare it to the exa t solution that was found.

R=1 Ω
b b b
x(t) = u(t)
+ +
1
x (t) C = 1/4 F y (t)

− b b
− t

Solution:

For the spe ied input signal, the dierential equation of the ir uit is

dy (t)
dt
+ 4 y (t) = 4 u (t)
With y (0) = 0, the exa t solution for the output signal is

y (t) = 1 e 4t u (t)
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.4 ( ontinued)


To use the Euler method, write the dierential equation in the form

dy (t)
= g (t; y (t)) ; g (t; y (t)) = 4 y (t) + 4 u (t)
dt
The Euler method approximation y ^ (t) is
y^ ( (k + 1) Ts ) =^y (kTs ) + Ts g (kTs ; y^ (kTs ))
=^y (kTs ) + Ts ( 4 y^ (kTs ) + 4 u (kTs ))
y^ (kTs ) y (kTs )
Per ent error:

" (kTs ) =  100


y (kTs )

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.4 ( ontinued)


Complete s ript:

1 % Script: matex_2_4.m
2 %
3 Ts = 0.1; % Time increment
4 t = [0:Ts:1]; % Vector of time instants
5 % Compute the exact solution.
6 y = 1 exp( 4*t); % Eqn.(2.186)
7 % Compute the approximate solution using Euler method.
8 yhat = zeros(size(t));
9 yhat(1) = 0; % Initial value.
10 for k = 1:length(yhat) 1,
11 g = 4*yhat(k)+4; % Eqn.(2.188)
12 yhat(k+1) = yhat(k)+Ts*g; % Eqn.(2.189)
13 end;
14 % Graph exact and approximate solutions.
15 clf;
16 subplot(211);
17 plot(t,y,' ',t,yhat,'ro'); grid;
18 title('Exact and approximate solutions for RC circuit');
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.4 ( ontinued)


S ript  matex_2_4.m ontinued:

19 xlabel('Time (sec)');
20 ylabel('Amplitude');
21 legend('Exact solution','Approximate solution','Location','SouthEast');
22 % Compute and graph the percent approximation error.
23 err_pct = (yhat y)./y*100;
24 subplot(212);
25 plot(t(2:length(t)),err_pct(2:length(t)),'ro'); grid
26 title('Percent approximation error');
27 xlabel('Time (sec)');
28 ylabel('Error (%)');

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.4 ( ontinued)


A tual and approximate solutions for the RC ir uit and the per ent error for t = 0:1
se onds.

Exact and approximate solutions for RC circuit


1

0.8
Amplitude

0.6

0.4
Exact solution
0.2
Approximate solution
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
Percent approximation error
25

20
Percent error

15

10

0
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.4 ( ontinued)


A tual and approximate solutions for the RC ir uit and the per ent error for
t = 0:02 s.
Exact and approximate solutions for RC circuit
1

0.8
Amplitude
0.6

0.4
Exact solution
0.2
Approximate solution
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
Percent approximation error
5

4
Percent error

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)

Approx. Num. Solution

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.5

Improved numeri al solution of the RC ir uit

Solve the approximation problem of MATLAB Exer ise 2.4 using fun tion ode45(..)

Solution:

Start by developing a fun tion rc1(..) to ompute the right side g [t; y (t)℄ of the
dierential equation.

1 function ydot = rc1(t,y)


2 ydot = 4*y+4;
3 end
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.5 ( ontinued)


Complete s ript:

1 % Script: matex_2_5a.m
2 %
3 t = [0:0.1:1]; % Vector of time instants
4 % Compute the exact solution.
5 y = 1 exp( 4*t); % Eqn.(2.187)
6 % Compute the approximate solution using ode45().
7 [t,yhat] = ode45(@rc1,t,0);
8 % Graph exact and approximate solutions.
9 clf;
10 subplot(211);
11 plot(t,y,' ',t,yhat,'ro'); grid;
12 title('Exact and approximate solutions for RC circuit');
13 xlabel('Time (sec)');
14 ylabel('Amplitude');
15 legend('Exact solution','Approximate solution','Location','SouthEast');
16 % Compute and graph the percent approximation error.
17 err_pct = (yhat y')./y'*100;
18 subplot(212);
19 plot(t(2:max(size(t))),err_pct(2:max(size(t))),'ro'); grid

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.5 ( ontinued)


S ript  matex_2_5a.m ontinued:

20 title('Percent approximation error');


21 xlabel('Time (sec)');
22 ylabel('Percent error');

Exact and approximate solutions for RC circuit


1

0.8
Amplitude

0.6

0.4
Exact solution
0.2
Approximate solution
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
×10−4 Percent approximation error
20

15
Percent error

10

−5
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time (sec)
Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.5 ( ontinued)


Modied s ript that uses an anonymous fun tion instead of  r 1.m.

1 % Script: matex_2_5b.m
2 %
3 t = [0:0.1:1]; % Vector of time instants
4 % Compute the exact solution.
5 y = 1 exp( 4*t); % Eqn.(2.187)
6 % Compute the approximate solution using ode45().
7 rc2 = @(t,y) 4*y+4;
8 [t,yhat] = ode45(rc2,t,0);
9 % Graph exact and approximate solutions.
10 clf;
11 subplot(211);
12 plot(t,y,' ',t,yhat,'ro'); grid;
13 title('Exact and approximate solutions for RC circuit');
14 xlabel('Time (sec)');
15 ylabel('Amplitude');
16 legend('Exact solution','Approximate solution','Location','SouthEast');
17 % Compute and graph the percent approximation error.
18 err_pct = (yhat y')./y'*100;

Chapter 2
MATLAB Exer ises

MATLAB Exer ise 2.5 ( ontinued)


S ript  matex_2_5b.m ontinued:

19 subplot(212);
20 plot(t(2:max(size(t))),err_pct(2:max(size(t))),'ro'); grid
21 title('Percent approximation error');
22 xlabel('Time (sec)');
23 ylabel('Percent error');

Approx. Num. Solution

You might also like