0% found this document useful (0 votes)
97 views20 pages

KKKM3473 System Dynamics & Control Engineering: Assoc. Prof. Dr. Sallehuddin M. Haris

The document provides steps to solve second order ordinary differential equations (ODEs) of the form ẍ(t) + a1ẋ(t) + a0x(t) = u(t). Specifically, it outlines: 1) Finding the homogeneous solution xh(t) by assuming a form and solving the characteristic equation. 2) Finding the particular solution xp(t) using the method of undetermined coefficients. 3) The total solution is the sum of the homogeneous and particular solutions, x(t) = xh(t) + xp(t). It then applies these steps to solve the example ODE ẍ(t) + 5ẋ

Uploaded by

natasha
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)
97 views20 pages

KKKM3473 System Dynamics & Control Engineering: Assoc. Prof. Dr. Sallehuddin M. Haris

The document provides steps to solve second order ordinary differential equations (ODEs) of the form ẍ(t) + a1ẋ(t) + a0x(t) = u(t). Specifically, it outlines: 1) Finding the homogeneous solution xh(t) by assuming a form and solving the characteristic equation. 2) Finding the particular solution xp(t) using the method of undetermined coefficients. 3) The total solution is the sum of the homogeneous and particular solutions, x(t) = xh(t) + xp(t). It then applies these steps to solve the example ODE ẍ(t) + 5ẋ

Uploaded by

natasha
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/ 20

KKKM3473

System Dynamics & Control Engineering

Assoc. Prof. Dr. Sallehuddin M. Haris

May 20, 2021


Solution to ODEs

Given the ODE

ẍ (t) + a1 ẋ (t) + a0 x (t) = u (t)

To find the solution x (t),


1 Firstly find the homogeneous solution, xh (t)
2 Next, find the particular solution xp (t)
3 Then, the solution is the sum of the homogeneous and particular
solutions
x (t) = xh (t) + xp (t)

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 2 / 20
Solution to ODEs

Given a 2nd order ordinary differential equationn (ODE)

ẍ (t) + a1 ẋ (t) + a0 x (t) = u (t)

Step 1
Find the solution xh (t) to the homogeneous equation

ẍ (t) + a1 ẋ (t) + a0 x (t) = 0 (1)

Assume that the homogeneous solution is of the form

xh (t) = Ceλt (2)

where C and λ are both constants.

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 3 / 20
Solution to ODEs
Substitute (2) into (1)
d2 d
2
Ceλt + a1 Ceλt + a0 Ceλt = 0
dt dt
λ Ce + a1 λCeλt + a0 Ceλt = 0
2 λt
h i
Ceλt λ2 + a1 λ + a0 = 0 (3)

For any non-trivial solution (C 6= 0), (3) is true when

λ2 + a1 λ + a0 = 0 (4)

Hence, the homogeneous solution is of the form

xh (t) = C1 eλ1 t + C2 eλ2 t (5)

where λ1 and λ2 are the roots of (4) and C1 and C2 are constants.
Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 4 / 20
Solution to ODEs
Step 2
Find the particular integral
The method of undetermined coefficients is often used.
Some particular integrals using this method are as follows:

u (t) Assumed form for xp (t) Test value


k K 0
ktn (n = 1, 2, . . .) Kn tn + Kn−1 tn−1 + . . . + K1 t + K0 0
keλt Keλt λ
keiωt Keiωt iω
k cos (ωt) K1 cos (ωt) + K2 sin (ωt) iω
k sin (ωt) K1 cos (ωt) + K2 sin (ωt) iω

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 5 / 20
Solution to ODEs

Step 3
Obtain the complete solution adding the particular integral to the
homogeneous solution.

x (t) = C1 eλ1 t + C2 eλ2 t + xp (t) (6)

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 6 / 20
Example

Given

ẍ (t) + 5ẋ (t) + 6x (t) = 1, x (0) = 0, ẋ (0) = 0

Find x (t) in terms of t.

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 7 / 20
Example
First, find the solution to the homogeneous equation

ẍh (t) + 5ẋh (t) + 6xh (t) = 0

Then,
h i
Ceλt λ2 + 5λ + 6 = 0
λ2 + 5λ + 6 = 0
(λ + 2) (λ + 3) = 0
λ1 = −2, λ2 = −3

Hence,
xh (t) = C1 e−2t + C2 e−3t

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 8 / 20
Example
Then, find the particular integral.

ẍp (t) + 5ẋp (t) + 6xp (t) = 1 (7)

Using the method of undetermined coefficients (from the table),

xp (t) = K (8)

Then,
d
ẋp (t) = K = 0, (9)
dt
d
ẍp (t) = 0 = 0 (10)
dt

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 9 / 20
Example

Substitute (8), (9) and (10) into (7),

(0) + 5 (0) + 6 (K) = 1


1
K=
6
Then

x (t) = xh (t) + xp (t)


1
= C1 e−2t + C2 e−3t +
6

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 10 / 20
Example

From the initial conditions,


1
x (0) = C1 e−2(0) + C2 e−3(0) + =0
6
1
C1 + C2 + = 0 (11)
6

d
x |t=0 = −2C1 e−2(0) − 3C2 e−3(0) + 0 = 0
dt
−2C1 − 3C2 = 0 (12)

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 11 / 20
Example

Solving (11) and (12) simultaneously gives


1 1
C1 = − , C2 =
2 3
Hence, the solution is
1 1 1
x (t) = − e−2t + e−3t +
2 3 6

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 12 / 20
The Laplace Transform

Alternatively, ODEs can be solved by making use of Laplace


transforms.
The Laplace transform L is defined as

n o
L f (n) = sn F (s) − sn−1 f (0) − sn−2 f 0 (0) − . . . sf n−2 (0) − f n−1 (0)

where s is the Laplace variable.

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 13 / 20
The Laplace Transform - Example

Given

ẍ (t) + 5ẋ (t) + 6x (t) = 1, x (0) = 0, ẋ (0) = 0

Find x (t) in terms of t.

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 14 / 20
The Laplace Transform - Example
Taking Laplace transforms on both sides gives

L {ẍ (t)} + 5L {ẋ (t)} + 6L {x (t)} = L {1}


1
s2 X (s) − sx (0) − ẋ (0) + 5 [sX (s) − x (0)] + 6X (s) =
s
1
s2 X (s) + 5sX (s) + 6X (s) =
s
  1
s2 + 5s + 6 X (s) =
s
Then,
1 1
X (s) = =
s (s2 + 5s + 6) s (s + 2) (s + 3)

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 15 / 20
The Laplace Transform - Example

Breaking into partial fractions gives


1 A B C
= + +
s (s + 2) (s + 3) s s+2 s+3

where A, B and C are constants.


Hence,

1 = A (s + 2) (s + 3) + Bs (s + 3) + Cs (s + 2) (13)

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 16 / 20
The Laplace Transform - Example
From (13), let s = 0, then
6A = 1
1
A=
6
From (13), let s = −2, then
−2B = 1
1
B=−
2
From (13), let s = −3, then
3C = 1
1
C=
3
Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 17 / 20
The Laplace Transform - Example
Hence,
A B C
X (s) = + +
s s+2 s+3
1 1 1
= − +
6s 2 (s + 2) 3 (s + 3)

Taking inverse Laplace transforms on both sides gives


( ) ( )
1 1 1
 
−1 −1
L {X (s)} = L − L−1 + L−1
6s 2 (s + 2) 3 (s + 3)
1 1 1
x (t) = − e−2t + e−3t
6 2 3

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 18 / 20
Transfer Functions

The Laplace transform converts ordinary differential (ODE)


equations into algebraic equations.
Solving algebraic equations is easier than solving ODEs.
After the algebraic solution, the solution to the ODE can be
obtained just performing the inverse Laplace transform on the
algebraic solution.
Dynamic systems are often modelled in the form of transfer
functions.
The transfer function is defined as the Laplace transform of the
output of the system divided by the Laplace transform of the
input of the system, taking all initial conditions to be zero.
The output is the variable of interest that is to be controlled.

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 19 / 20
Transfer Functions - Example

The equation of motion of a dynamic system is given by

ẍ (t) + 5ẋ (t) + 6x (t) = u (t)

where u (t) is the system input.


The transfer function, G (s) is then

X (s) 1
G (s) = = 2
U (s) s + 5s + 6

Assoc. Prof. Dr. Sallehuddin M. Haris KKKM3473 System Dynamics & Control Engineering May 20, 2021 20 / 20

You might also like