Professional Documents
Culture Documents
LINEAR DIFFERENTIAL
EQUATIONS WITH
CONSTANT-COEFFICIENTS
(LCCDE)
BY LAPLACE TRANSFORM
jmmartinezjr
07092003
1
jmmartinezjr 07092003
TOPIC OBJECTIVES
To be able to:
LAPLACE TRANSFORM
Steps in Solving LCCDE using
Laplace Transform
f (t ) F (s )
at 1
e t (s − a) 2
ω
e sin ωt
at
( s − a) + ω
2 2
( s − a)
e cos ωt
at
( s − a) 2 + ω 2 5
jmmartinezjr 07092003
− at a2
at −1 + e
s 2 ( s + a)
a −b a − b − at a ( s + b)
+ bt − e
a a s 2 ( s + a)
b − at a −bt ab
1+ e − e 6
a −b a −b s ( s + a )( s + b)
jmmartinezjr 07092003
Example 1:
Find the Total Solution of the Differential
Equation (Assume all initial conditions=0)
2
d y dy
2
+ 5 + 4 y = 2t
dt dt
Solution: First, we will convert the D.E.
into Laplace Transform
2
s Y ( s ) + 5sY ( s ) + 4Y ( s ) = 2
2
s
8
jmmartinezjr 07092003
Example 1:
Solving for Y(s)
2
2
Y (s) = 2 s
s + 5s + 4
simplifying
2
Y ( s) = 2
s ( s + 4)( s + 1)
9
jmmartinezjr 07092003
Example 1:
Taking the Partial Fraction Expansion
2 A B C D
Y (s) = 2 = 2+ + +
s ( s + 4)( s + 1) s s ( s + 4) ( s + 1)
2 2 2
D = ( s + 1) 2 = =
s ( s + 4)( s + 1) s = −1 (−1) (−1 + 4) 3
2
10
jmmartinezjr 07092003
Example 1:
Using cover-up method
2 2 1
A=s 2 2
= =
s ( s + 4)( s + 1) s =0 (0 + 4)(0 + 1) 2
1 d 2 2 d 2
B= (s ) 2 = 2
1! ds s ( s + 4)( s + 1) s =0 ds ( s + 5s + 4) s =0
[ −2
B = − 2( s + 5s + 4) (2 s + 5)
2
] s =0
−2
= −2(4) (5) =
−5
8
11
jmmartinezjr 07092003
Example 1:
substituting
1 −5 −1 2
Y ( s ) = 22 + 8 + 24 + 3
s s ( s + 4) ( s + 1)
Example 2:
Find the Total Solution of the Differential
Equation (Assume all initial conditions=0)
2
d y dy
2
+ − 2 y = 2t − 40 cos 2t
dt dt
Solution: First, we will convert the D.E.
into Laplace Transform
2 s
s Y ( s ) + sY ( s ) − 2Y ( s ) = 2 − 40 2
2
s s +4
13
jmmartinezjr 07092003
Example 2:
Solving for Y(s)
2 s
− 40 2
Y (s) = s 2
s + 4
s +s−2
2
simplifying
− 40 s 3 + 2 s 2 + 8
Y (s) = 2 2
s ( s + 4)( s 2 + s − 2)
14
jmmartinezjr 07092003
Example 2:
Taking the Partial Fraction Expansion
− 40 s 3 + 2 s 2 + 8
Y (s) = 2 2
s ( s + 4)( s + s − 2)
2
A B C D E F
= 2+ + + + +
s s (s − j2) (s + j2) s − (−2) s −1
15
Example 2:
jmmartinezjr 07092003
− 40(0) 3 + 2(0) 2 + 8
= = −1
(0 − j 2)(0 + j 2)(0 + 2)(0 − 1) 16
jmmartinezjr 07092003
Example 2:
1 d 2 − 40 s 3 + 2 s 2 + 8
B= s 2
1! ds s ( s − j 2)( s + j 2)( s + 2)( s − 1) s =0
d − 40 s 3 + 2 s 2 + 8
= 4 3
ds ( s + s + 2 s 2 + 4 s − 8) s =0
(−8)(0) − (8)(4) − 1
B= =
(−8) 2
2 17
jmmartinezjr 07092003
Example 2:
− 40 s 3 + 2s 2 + 8 − 40 s 3 + 2s 2 + 8
C = ( s − j 2) 2 = 2
s ( s − j 2)( s + j 2)( s + 2)( s − 1) s = j 2 s ( s + j 2)( s + 2)( s − 1) s = j 2
− 40( j 2) 3 + 2( j 2) 2 + 8
= = 3+ j
( j 2) ( j 2 + j 2)( j 2 + 2)( j 2 − 1)
2
− 40 s 3 + 2 s 2 + 8 − 40 s 3 + 2 s 2 + 8
D = ( s + j 2) 2 = 2
s ( s − j 2)( s + j 2)( s + 2)( s − 1) s = − j 2 s ( s − j 2)( s + 2)( s − 1) s = − j 2
− 40(− j 2) 3 + 2(− j 2) 2 + 8
= = 3− j
(− j 2) (− j 2 − j 2)(− j 2 + 2)(− j 2 − 1)
2
18
jmmartinezjr 07092003
Example 2:
− 40 s 3 + 2 s 2 + 8 − 40 s 3 + 2 s 2 + 8
E = ( s + 2) 2 = 2
s ( s − j 2)( s + j 2)( s + 2)( s − 1) s = −2 s ( s − j 2)( s + j 2)( s − 1) s = −2
− 40(−2) 3 + 2(−2) 2 + 8 −7
== =
(−2) 2 (−2 − j 2)(−2 + j 2)(−2 − 1) s = −2 2
− 40 s 3 + 2 s 2 + 8 − 40 s 3 + 2 s 2 + 8
F = ( s − 1) 2 = 2
s ( s − j 2)( s + j 2)( s + 2)( s − 1) s =1 s ( s − j 2)( s + j 2)( s + 2) s =1
− 40(1) 3 + 2(1) 2 + 8
= 2 = −2
(1) (1 − j 2)(1 + j 2)(1 + 2) s =1
19
jmmartinezjr 07092003
Example 2:
from slide 15
A B C D E F
= 2+ + + + +
s s (s − j2) (s + j2) s − (−2) s −1
Example 2:
taking the Inverse Laplace
1 − j 2t 7 − 2t
Y (t ) = −t − + (3 + j )e + (3 − j )e
j 2t
− e − 2e t
2 2
or
1 7 − 2t
y (t ) = −t − + 6 cos 2t − 2 sin 2t − e − 2e t
2 2
21
jmmartinezjr 07092003
COVER-UP METHOD
R = [(s − a) F (s)] s =a
[ ]
n−k
1 d
Rk = n−k
( s − a ) n
F ( s )
(n − k )! ds s =a
where:
a = multiple root
n = multiplicity of the roots
k = order of root=n,n-1,…3,2,1
23
jmmartinezjr 07092003
MATLAB IMPLEMENTATION
MatLab can find the solution to LCCDE using
Symbolic Toolbox
First create symbolic variables s and t
syms s t
Then, convert time functions into
Laplace Transform using
laplace(F)
Finally, take the Inverse Laplace Transform using
ilaplace(F) 24
jmmartinezjr 07092003
MATLAB IMPLEMENTATION
Example:
Find the Total Solution of the Differential
Equation (Assume all initial conditions=0)
2
d y dy
2
+ − 2 y = 2t − 40 cos 2t
dt dt
Solution: First, we will convert f (t ) = 2t − 40 cos 2t
into Laplace Transform
>>f=laplace(2*t-40*cos(2*t))
f =
2/s^2-40*s/(s^2+4) 25
jmmartinezjr 07092003
MATLAB IMPLEMENTATION
Example:
Then we will solve for Y(s) by dividing f(t)
with the auxiliary polynomial derived from
the left side of the D.E.
>>Y=f/(s^2+s-2)
Y =
(2/s^2-40*s/(s^2+4))/(s^2+s-2)
26
jmmartinezjr 07092003
MATLAB IMPLEMENTATION
Example:
Finally, we will convert Y(s) to y(t)
>> y=ilaplace(Y)
y =
-t-1/2-7/2*exp(-2*t)- 2*exp(t)
+ 6*cos(2*t)-2*sin(2*t)
MATLAB IMPLEMENTATION
(Other useful Matlab Functions )
[R,P,K]=residue(B,A)
where:
R=residues (numerator)
P=poles i.e (s-p1)(s-p2)…
K=direct term (null if order of B < A) 28
jmmartinezjr 07092003
MATLAB IMPLEMENTATION
Example: Find the partial fraction expansion of
4
Y (s) = 3
s + 4 s 2 + 5s + 2
>> B=[4];
>> A=[1 4 5 2]; Y(s) can be written as
>> [R,P,K]=residue(B,A)
R = 4 −4 4
Y ( s) = + +
4.0000 s + 2 ( s + 1) ( s + 1) 2
-4.0000
4.0000
P =
-2.0000 Multiple poles should be written
-1.0000 like this
-1.0000
K =
29
[]
jmmartinezjr 07092003
MATLAB IMPLEMENTATION
(Other useful Matlab Functions )
pretty(F)
The pretty function prints symbolic output in
a format that resembles typeset mathematics.
>> syms s t
>> y=ilaplace(4/(s^3+4*s^2+5*s+2))
y =
4*exp(-2*t)+4*t*exp(-t)-4*exp(-t)
>> pretty(y)
4 exp(-2 t) + 4 t exp(-t) - 4 exp(-t)
Difficult to read? Better! 30
jmmartinezjr 07092003
Determination of (constants)
residues by equating
coefficients
Instead of expanding Y(s) as shown in slide 15,
we will use the following expansion
− 40 s + 2 s + 8
3 2
Y (s) = 2 2
s ( s + 4 )( s + s − 2 )
2
A B Cs + D E F
= 2+ + 2 + +
s s s + 4 s + 2 s −1 31
jmmartinezjr 07092003
Determination of (constants)
residues by equating coefficients
To solve for the other constants, we will
equate coefficients
Expanding each term, then grouping similar terms
− 40s + 2s + 8 = ( B + C + E + F ) s
3 2 5
+ ( A + B + C + D − E + 2F )s 4
+ ( A + 2 B − 2C + D + 4 E + 4 F ) s 3
+ (2 A + 4 B − 2 D − 4 E + 8F ) s 2
+ (4 A − 8 B) s + (−8 A) 32
jmmartinezjr 07092003
Determination of residues by
equating coefficients
We will came up with the following equalities
B+C + E + F = 0 (eq.1)
A + B + C + D − E + 2F = 0 (eq.2)
A + 2 B − 2C + D + 4 E + 4 F = −40 (eq.3)
2 A + 4 B − 2 D − 4 E + 8F = 2 (eq.4)
4 A − 8B = 0 (eq.5)
− 8A = 8 (eq.6) 33
jmmartinezjr 07092003
Determination of residues by
equating coefficients
In matrix form
0 1 1 0 1 1 A 0
1 1 1 1 − 1
2 B 0
1 2 −2 1 4 4 C − 40
=
2 4 0 −2 −4 8 D 2
4 −8 0 0 0 0 E 0
− 8 0 0 0 0 0 F 8
34
jmmartinezjr 07092003
Determination of residues by
equating coefficients
Using Cramer’s Rule or other methods for
system of linear equations
A = −1
1
B=−
2
C =6
D = −4
7
E=−
2
F = −2 35
jmmartinezjr 07092003
Determination of residues by
equating coefficients
from slide 31
A B Cs + D E F
= 2+ + 2 + +
s s s + 4 s + 2 s −1
substituting
1 7
− −
−1 2 6s − 4 2 −2
Y ( s ) == 2 + + 2 + +
s s s + 4 s + 2 s −1
36
jmmartinezjr 07092003
Determination of residues by
equating coefficients
1 7 − 2t
y (t ) = −t − + 6 cos 2t − 2 sin 2t − e − 2e t
2 2
37
jmmartinezjr 07092003
MATLAB IMPLEMENTATION
(Other useful Matlab Functions )
dsolve(‘D.E.’,’initial cond.’,’ind.var.’)
•The function dsolve computes symbolic solutions to
ordinary differential equations.
MATLAB IMPLEMENTATION
(Other useful Matlab Functions )
Example:
Find the Total Solution of the Differential
Equation (All initial conditions=0)
2
d y dy
2
+ − 2 y = 2t − 40 cos 2t
dt dt
Solution:
>> dsolve('D2y=-Dy+2*y+2*t-40*cos(2*t)','y(0)=0','Dy(0)=0', 't')
ans =
-t-13/2+12*cos(t)^2-4*cos(t)*sin(t)-2*exp(t)-7/2*exp(-2*t)
39
jmmartinezjr 07092003
Example:
The Total Solution
13 7 − 2t
y (t ) = −t − + 12 cos t − 4 cos t sin t − 2e − e
2 t
2 2
can also be written as
1 7 − 2t
y (t ) = −t − + 6 cos 2t − 2 sin 2t − 2e − e
t
2 2
by considering that
1 + cos(2t ) sin(2t )
12 cos t = 12
2
= 6 + 6 cos 2t − 4 cos t sin t = −4 = −2 sin 2t
2 2
40
jmmartinezjr 07092003
REFERENCES:
• Elementary Differential Equations,
7thedition,by Rainville E.D.,and Bedient P.E.
• Schaum’s Outline Series “Feedback
and Control Systems”, 2nd edition, by
DiStefano III, J.J., Stubberud A.R., and
Williams I.J.
• Control Systems Engineering, 3rd
edition, by Nise N.S.
41