Download as pdf or txt
Download as pdf or txt
You are on page 1of 83

CHAPTER 3

SOLUTION OF DIFFERENTIAL
EQUATIONS OF DYNAMIC
SYSTEMS
Problems
Problems for Section 3-2

3-1. Find the poles and zeros of the following functions (including the ones at
infinity, if any). Mark the finite poles with × and the finite zeros with o in the s-
plane.
10 ( s + 2 )
G (s) =
s ( s + 1)( s + 10 )
2
(a)
10s ( s + 1)
G (s) =
(b)
( s + 2 ) ( s 2 + 3s + 2 )
10 ( s + 2 )
G (s) =
s ( s 2 + 2s + 2 )
(c)
e−2 s
G (s) =
10s ( s + 1)( s + 2 )
(d)

1
(a) Poles: s = 0, 0, −1, −10; (b) Poles: s = −2, −2;
Zeros: s = −2, , , . Zeros: s = 0.
The pole and zero at s = −1 cancel each other.

јω јω
s-plane s-plane

σ σ
x o
x o x x
-2 0
-10 -2 -1 0

(c) Poles: s = 0, −1 + j, −1 − j; (d) Poles: s = 0, −1, −2, .


Zeros: s = −2.

јω јω
s-plane s-plane
x - -j

σ σ
x x x o I x
-2 -1 0 -2 -1 0

x - -j

2
3-2. Poles and zeros of a function are given; find the function:
(a) Simple poles: 0, −2; poles of order 2: −3; zeros: −1, 
(b) Simple poles: −1, −4; zeros: 0
(c) Simple poles: −3, ∞; poles of order 2: 0,−1; zeros:  j, 

(𝒔+𝟏)
(a) G(s) =
𝒔(𝒔+𝟐)(𝒔+𝟑)𝟐

𝒔𝟐
(b) G(s) = (𝒔+𝟏)(𝒔+𝟒)

𝒔𝟐 −𝟏
(c) G(s) =
𝒔𝟐 (𝒔+𝟑)(𝒔+𝟏)𝟐

3-3. Use MATLAB to find the poles and zeros of the functions in Problem 2-1.
MATLAB code:
clear all;
s = tf('s')

'Generated transfer function:'


Ga=10*(s+2)/(s^2*(s+1)*(s+10))
'Poles:'
pole(Ga)
'Zeros:'
zero(Ga)

'Generated transfer function:'


Gb=10*s*(s+1)/((s+2)*(s^2+3*s+2))
'Poles:';
pole(Gb)
'Zeros:'
zero(Gb)

'Generated transfer function:'


Gc=10*(s+2)/(s*(s^2+2*s+2))
'Poles:';
pole(Gc)
'Zeros:'
zero(Gc)

'Generated transfer function:'

3
Gd=pade(exp(-2*s),1)/(10*s*(s+1)*(s+2))
'Poles:';
pole(Gd)
'Zeros:'
zero(Gd)

Poles and zeros of the above functions:


(a)

Poles: 0 0 -10 -1
Zeros: -2
(b)

Poles: -2.0000 -2.0000 -1.0000


Zeros: 0 -1
(c)
Poles: 0 -1.0000 + 1.0000 -1.0000 - 1.0000i
Zeros: -2

Generated transfer function:


(d)
Using first order Pade approximation for exponential term:
Poles: 0 -2.0000 -1.0000 + 0.0000 -1.0000 - 0.0000i
Zeros: 1

L sin 2 2t L cos 2 2t


3-4. Use MATLAB to obtain Then, calculate when you
L sin 2t
2
L cos 2t
2
know . Verify your answer by calculating in MATLAB.
MATLAB code:
clear all;
syms t
s=tf('s')

f1 = (sin(2*t))^2
L1=laplace(f1)

% f2 = (cos(2*t))^2 = 1-(sin(2*t))^2 ===> L(f2)=1/s-L(f1) ===>


L2= 1/s - 8/s/(s^2+16)

f3 = (cos(2*t))^2
L3=laplace(f3)
'verified as L2 equals L3'
4
MATLAB solution for
8(𝑠 2 +16)
L {sin2 2𝑡 } is :
𝑠
Calculating L {cos2 2𝑡 } based on L {sin2 2𝑡 }
(3+8𝑠)
2 (𝑠4 +16 𝑠2
L{cos 2𝑡 } =𝑠
8(𝑠 2 +16)
Verifying L{cos2 2𝑡 } ∶
𝑠

3-5. Find the Laplace transforms of the following functions. Use the theorems
on Laplace transforms, if applicable.
g ( t ) = 5te −5t us ( t )
(a)
g ( t ) = ( t sin 2t + e −2t ) us ( t )
(b)
g ( t ) = 2e −2t sin 2t us ( t )
(c)
g ( t ) = sin 2t cos 2t us ( t )
(d)

g ( t ) =  e −5 kT  ( t − kT )
k =0
 ( t ) = unit-impulse function
(e) where
Solution:
0, t  0
Note: us ( t ) = 
1, t  0
By Laplace transform definition:

L  g ( t ) u ( t ) = g ( t ) e − st dt
0

(a) (b) (c)


5 4𝑠 1 4𝑠
𝐺 (𝑠 ) = 𝐺 (𝑠 ) = + 𝐺 (𝑠 ) =
(𝑠+5)2 (𝑠 2 +4) 𝑠+2 (𝑠 2 +4𝑠+8)

sin 4t
g ( t ) = ( sin 2t cos 2t ) us ( t ) = us ( t )
2
(d) 2
L  g ( t )  =
( s + 42 )
2

5
1
(e) 𝐺 (𝑠) = ∑∞
𝑘=0 𝑒
𝑘𝑇(𝑠+5)
=
1− 𝑒 −𝑇(𝑠+5)

Note: Section (e) requires assignment of T and a numerical loop calculation

3-6. Use MATLAB to solve Problem 3-5.

MATLAB code:
clear all;
syms t u

f1 = 5*t*exp(-5*t)
L1=laplace(f1)

f2 = t*sin(2*t)+exp(-2*t)
L2=laplace(f2)

f3 = 2*exp(-2*t)*sin(2*t)
L3=laplace(f3)

f4 = sin(2*t)*cos(2*t)
L4=laplace(f4)

f4 = cos(2 t) sin(2 t)
2
L4 = ------------
2
s + 16
Section (e) requires assignment of T and a numerical loop calculation

(a) 𝑔(𝑡 ) = 5𝑡𝑒 −5𝑡 𝑢𝑠 (𝑡)

5
Answer:
(𝑠+5)2

(b) 𝑔(𝑡 ) = (𝑡𝑠𝑖𝑛2𝑡 + 𝑒 −2𝑡 )𝑢𝑠 (𝑡)

𝑠 1
Answer: 4((𝑠2 + (𝑠+2))
+4)2

(c) 𝑔(𝑡 ) = 2𝑒 −2𝑡 𝑠𝑖𝑛2𝑡 𝑢𝑠 (𝑡 )


6
4
Answer: (𝑠 2 +4)(𝑠+8)

(d) 𝑔(𝑡 ) = sin 2𝑡 cos 2𝑡 𝑢𝑠 (𝑡 )


2
Answer: (𝑠 2 +16)

g (t ) = e −5kT
 (t − kT )
(e) k =0 where (t) = unit-impulse function

Section (e) requires assignment of T and a numerical loop calculation

3-7. Find the Laplace transforms of the functions shown in Fig. 3P-7. First,
write a complete expression for g(t), and then take the Laplace transform. Let
gT(t) be the description of the function over the basic period and then delay gT(t)
appropriately to get g(t). Take the Laplace transform of g(t) to get the following:

Figure 3P-7

7
(a)
g (t ) = u s (t ) − 2u s (t − 1) + 2u s (t − 2) − 2u s (t − 3) +
−s
1− e
(1 − 2 e )=
1 −s −2 s −3 s
G(s) = + 2e − 2e +
s (
s 1+ e
−s
)
gT (t ) = u s (t ) − 2u s (t − 1) + u s (t − 2) 0t2

(1 − 2e − s + e −2 s ) = (1 − e − s )
1 1 2
GT ( s ) =
s s
  −s
1− e
 s
1 − s 2 −2 ks
g (t ) = gT ( t − 2k )us ( t − 2k ) G( s) = (1 − e ) e = −s
k =0 k =0
s(1 + e )

(b)

g (t ) = 2tus (t ) − 4(t − 0.5)us (t − 0.5) + 4(t − 1)us (t − 1) − 4(t − 1.5)us (t − 1.5) +

( −0.5 s
2 1− e )
(1 − 2e ) = s 2 1 + e−0.5s
2 −0.5 s −s −1.5 s
G(s) = + 2e − 2e +
s
2
( )
gT (t ) = 2tus (t ) − 4(t − 0.5)us (t − 0.5) + 2(t − 1)us (t − 1) 0  t 1

(1 − 2e−0.5s + e− s ) = s 2 (1 − e−0.5s )
2 2 2
GT ( s ) = 2
s

  (
2 1− e
−0.5 s
)
(1 − e ) e
2
g (t ) =  gT (t − k )us (t − k ) G(s) = 
−0.5 s 2 − ks
= 2
s (1 + e )
2 −0.5 s
k =0 k =0 s

3-8. Find the Laplace transform of the following function.


 t +1 0  t  1
 1 t  2
 0
 g (t ) = .
 2−t 2  t  3
 0 t 3

8
g ( t ) = ( t + 1)u s ( t ) − ( t − 1)u s ( t − 1) − 2u s ( t − 1) − ( t − 2)u s ( t − 2) + ( t − 3)u s ( t − 3) + u s ( t − 3)
Solution:

2(
1 − e − e + e ) + (1 − 2e + e )
1 −s −2 s −3s −s −3s 1
G(s) =
s s

3-9. Find the Laplace transform of the periodic function in Fig. 3P-9.

Figure 3P-9
𝑇
𝑇 𝑇
2
−𝑠𝑡 −𝑠𝑡
ℒ {𝑓 (𝑡 )} = ∫ 𝑓(𝑡 )𝑒 𝑑𝑡 = ∫ 𝑒 𝑑𝑡 + ∫ (−1)𝑒 −𝑠𝑡 𝑑𝑡
𝑇
0 0
2
𝑇𝑠 𝑇𝑠
1 − 𝑒 − 2 𝑒 −𝑇𝑠 − 𝑒 − 2 1 −
𝑇𝑠 2
= + = [1 −𝑒 2]
𝑠 𝑠 𝑠
3-10. Find the Laplace transform of the function in Fig. 3P-10.

Figure 3P-10

9
𝑇
𝑇 𝑇
2
ℒ {𝑓 (𝑡 )} = ∫ 𝑓(𝑡 )𝑒 −𝑠𝑡 𝑑𝑡 = ∫ 𝑒 −𝑠𝑡 𝑑𝑡 + ∫ (−1)𝑒 −𝑠𝑡 𝑑𝑡
𝑇
0 0
2
𝑇𝑠 𝑇𝑠
1 − 𝑒 − 2 𝑒 −𝑇𝑠 − 𝑒 − 2 1 𝑇𝑠 2
= + = [1 − 𝑒 − 2 ]
𝑠 𝑠 𝑠

3-11. The following differential equations represent linear time-invariant


systems, where r(t) denotes the input and y(t) the output. Find the transfer function
Y(s)/R(s) for each of the systems. (Assume zero initial conditions.)
d 3 y (t ) d 2 y (t ) dy ( t ) dr ( t )
+ 2 + 5 + 6 y ( t ) = 3 + r (t )
(a) dt 3 dt 2 dt dt

d 4 y (t ) d 2 y ( t ) dy ( t )
+ 10 + + 5 y ( t ) = 5r ( t )
(b) dt 4 dt 2 dt

d 3 y (t ) d 2 y (t ) dy ( t ) dr ( t )
+ y ( t ) + 2 y ( ) d = + 2r ( t )
t
3
+ 10 2
+2
(c) dt dt dt 0 dt

d 2 y ( t ) dy ( t )
2 + + 5 y ( t ) = r ( t ) + 2r ( t − 1)
(d) dt 2 dt

d 2 y ( t + 1) dy ( t + 1) dr ( t )
+ 5 y ( t + 1) = + 2r ( t ) + 2  r ( ) d
t
2
+4
dt dt dt −
(e)
d 3 y (t ) d 2 y ( t ) dy ( t ) dr ( t − 2 )
( ) y ( ) d = + 2r ( t − 2 )
t

(f) dt 2
+ 2
dt 2
+
dt
+ 2 y t + 2 − dt

Solution:
(a) (b)
Y (s) 3s + 1 Y (s) 5
= 3 2
= 4 2
R( s) s + 2 s + 5s + 6 R( s) s + 10 s + s + 5

(c) (d)
−s
Y ( s) s ( s + 2) Y (s) 1 + 2e
= 4 3 2
= 2
R(s) s + 10 s + 2 s + s + 2 R( s) 2s + s + 5

e) 𝑥(𝑡) = 𝑦 (𝑡 + 1)

10
d 2 x(t ) dx(t ) dr ( t )
( ) −r ( ) d
t
 + 4 + 5 x (t ) = + 2 r t + 2
dt 2 dt dt

By using Laplace transform, we have:


𝑅(𝑠)
𝑠 2 𝑋(𝑠) + 4𝑠𝑋(𝑠) + 5𝑋(𝑠) = 𝑠𝑅(𝑠) + 2𝑅(𝑠) +
𝑠
As X(s) = e−s Y(s), then
𝑠 2 + 2𝑠 + 1
(𝑠 2 + 4𝑠 + 𝑡)𝑒 −𝑠 𝑌(𝑠) = 𝑅(𝑠)
𝑠
Then:

Y (s) ( s + 1) e s
2

=
R ( s ) s ( s 2 + 4s + s )

f) By using Laplace transform we have:


2
(𝑠 3 + 2𝑠 2 + 𝑠 + 2 + ) 𝑌(𝑠) = 𝑠𝑒 −𝑠 𝑅(𝑠) + 2𝑒 −𝑠 𝑅(𝑠)
𝑠
As a result:
Y (s) s ( s + 2 ) e− S
=
R( s) s 4 + 2s 3 + s 2 + 2s + 2

3-12. Use MATLAB to find Y(s)/R(s) for the differential equations in Problem 2-
29.
After taking the Laplace transform, the equation was solved in terms of Y(s), and consecutively
was divided by input R(s) to obtain Y(s)/R(s):

MATLAB code:

clear all;

syms Ys Rs s

sol1=solve('s^3*Ys+2*s^2*Ys+5*s*Ys+6*Ys=3*s*Rs+Rs','Ys')

Ys_Rs1=sol1/Rs

sol2=solve('s^4*Ys+10*s^2*Ys+s*Ys+5*Ys=5*Rs','Ys')

Ys_Rs2=sol2/Rs

sol3=solve('s^3*Ys+10*s^2*Ys+2*s*Ys+2*Ys/s=s*Rs+2*Rs','Ys')

Ys_Rs3=sol3/Rs

sol4=solve('2*s^2*Ys+s*Ys+5*Ys=2*Rs*exp(-1*s)','Ys')

11
Ys_Rs4=sol4/Rs

%Note: Parts E&F are too complicated with MATLAB, Laplace of integral
is not executable in MATLAB.....skipped

MATLAB Answers:

Part (a): Y(s)/R(s)= (3*s+1)/(5*s+6+s^3+2*s^2);

Part (b): Y(s)/R(s)= 5/(10*s^2+s+5+s^4)

Part (c): Y(s)/R(s)= (s+2)*s/(2*s^2+2+s^4+10*s^3)

Part (d): Y(s)/R(s)= 2*exp(-s)/(2*s^2+s+5)

%Note: Parts E&F are too complicated with MATLAB, Laplace of integral
is not executable in MATLAB.....skipped

Problems for Section 3-3

3-13. Find the inverse Laplace transforms of the following functions. First,
perform partial-fraction expansion on G(s); then, use the Laplace transform table.
1
G (s) =
s ( s + 2 )( s + 3)
(a)
10
G (s) =
( s + 1) ( s + 3)
2

(b)
100 ( s + 2 )
G (s) = e− s
s ( s + 4 ) ( s + 1)
2
(c)
2 ( s + 1)
G (s) =
s ( s2 + s + 2)
(d)
1
G (s) =
( s + 1)
3

(e)
2 ( s 2 + s + 1)
G (s) =
s ( s + 1.5) ( s 2 + 5s + 5 )
(f)
2 + 2se− s + 4e−2 s
G (s) =
(g) s 2 + 3s + 2

12
2s + 1
G (s) =
(h) s + 6s 2 + 11s + 6
3

3s 3 + 10s 2 + 8s + 5
G (s) = 4
(i) s + 5 s 3 + 7 s 2 + 5s + 6

Solution:
(a)
1 1 1 1 1 −2 t 1 −3t
G( s) = − + g (t ) = − e + e t0
3s 2( s + 2) 3( s + 3) 3 2 3

(b)
−2.5 5 2.5 −t −t −3t
G( s) = + 2
+ g ( t ) = −2.5e + 5te + 2.5e t0
s + 1 ( s + 1) s+3

(c)

G(s) = ( 50
s

s +1
20

30 s + 20
s +4
2 ) e
−s

g (t ) = 50 − 20e
− ( t −1)
− 30 cos 2( t − 1) − 5 sin 2( t − 1)  us (t − 1)

(d)
1 s −1 1 1 s
G( s) = − 2
= + 2
− 2
Taking the inverse Laplace transform,
s s + s+2 s s + s+2 s + s+2

g (t ) = 1 + 1.069e
−0.5t
sin 1.323t + sin (1.323t − 69.3o ) = 1 + e −0.5t (1.447 sin 1.323t − cos1.323t ) t0

2 −t
(e) g (t ) = 0.5t e t 0

(f) Try using MATLAB

>> b=num*2

b=

2 2 2

>>num =

1 1 1

>> denom1=[1 1]

denom1 =
13
1 1

>> denom2=[1 5 5]

denom2 =

1 5 5

>> num*2

ans =

2 2 2

>> denom=conv([1 0],conv(denom1,denom2))

denom =

1 6 10 5 0

>> b=num*2

b=

2 2 2

>> a=denom

a=

1 6 10 5 0

>> [r, p, k] = residue(b,a)

r=

-0.9889

2.5889

-2.0000

0.4000

p=

-3.6180

-1.3820

14
-1.0000

k=[]

If there are no multiple roots, then the number of poles n is

b r r r
= 1 + 2 + ... + n + k
a s + p1 s + p2 s + pn

In this case, p1 and k are zero. Hence,

0.4 0.9889 2.5889 2


G ( s) = − + −
s s + 3.6180 s + 1.3820 s + 1

g (t ) = 0.4 − 0.9889e −3.618t + 1.3820e −2.5889t − 2e −t

2 2𝑒 −𝑠
(g) 𝐺(𝑠) = (𝑠+1)(𝑠+2) + 𝑠+1

2 2 2𝑒 −𝑠
= 𝑠+1 − 𝑠+2 + 𝑠+1

 ℒ−1 {G(s)} = 2e−t − 2e−2t + 2e−(t−1) 𝑢(𝑡 − 1)


1
2𝑠+1 2 3 5
(h) 𝐺(𝑠) = (𝑠+1)(𝑠+2)(𝑠+3)
= − 𝑠+1 + 𝑠+2 − 2(𝑠+3)

1 5
 ℒ−1 {𝐺(𝑠)} = − 2 𝑒−𝑡 + 3𝑒−2𝑡 − 2 𝑒−3𝑡

3𝑠3 +10𝑠2 +8𝑠+5 1 1 𝑠


(i) 𝐺(𝑠) = 𝑠34 +5𝑠3 +7𝑠2 +5𝑠+6 = 𝑠+2 + 𝑠+3 + 𝑠2 +1

 ℒ−1 {𝐺(𝑠)} = 𝑒−2𝑡 + 𝑒−3𝑡 + 𝑐𝑜𝑠𝑡

3-14. Use MATLAB to find the inverse Laplace transforms of the functions in
Problem 3-13. First, perform partial-fraction expansion on G(s); then, use the
inverse Laplace transform.
MATLAB code:

clear all;

syms s

15
f1=1/(s*(s+2)*(s+3))

F1=ilaplace(f1)

f2=10/((s+1)^2*(s+3))

F2=ilaplace(f2)

f3=10*(s+2)/(s*(s^2+4)*(s+1))*exp(-s)

F3=ilaplace(f3)

f4=2*(s+1)/(s*(s^2+s+2))

F4=ilaplace(f4)

f5=1/(s+1)^3

F5=ilaplace(f5)

f6=2*(s^2+s+1)/(s*(s+1.5)*(s^2+5*s+5))

F6=ilaplace(f6)

s=tf('s')

f7=(2+2*s*pade(exp(-1*s),1)+4*pade(exp(-2*s),1))/(s^2+3*s+2) %using
Pade command for exponential term

[num,den]=tfdata(f7,'v') %extracting the polynomial values

syms s

f7n=(-2*s^3+6*s+12)/(s^4+6*s^3+13*s^2+12*s+4) %generating sumbolic


function for ilaplace

F7=ilaplace(f7n)

f8=(2*s+1)/(s^3+6*s^2+11*s+6)

F8=ilaplace(f8)

16
f9=(3*s^3+10^s^2+8*s+5)/(s^4+5*s^3+7*s^2+5*s+6)

F9=ilaplace(f9)

Solution from MATLAB for the Inverse Laplace transforms:

1
Part (a): G( s) =
s( s + 2)( s + 3)

G(t)=-1/2*exp(-2*t)+1/3*exp(-3*t)+1/6

To simplify:

syms t

digits(3)

vpa(-1/2*exp(-2*t)+1/3*exp(-3*t)+1/6)

ans =-.500*exp(-2.*t)+.333*exp(-3.*t)+.167

10
Part (b): G( s) =
( s + 1) 2 ( s + 3)

G(t)= 5/2*exp(-3*t)+5/2*exp(-t)*(-1+2*t)

100( s + 2)
Part (c): G( s) = e− s
s( s 2 + 4 )( s + 1)

G(t)=Step(t-1)*(-4*cos(t-1)^2+2*sin(t-1)*cos(t-1)+4*exp(-1/2*t+1/2)*cosh(1/2*t-1/2)-4*exp(-

t+1)-cos(2*t-2)-2*sin(2*t-2)+5)

2( s + 1)
Part (d): G( s) =
s( s 2 + s + 2 )

17
G(t)= 1+1/7*exp(-1/2*t)*(-7*cos(1/2*7^(1/2)*t)+3*7^(1/2)*sin(1/2*7^(1/2)*t))

To simplify:

syms t

digits(3)

vpa(1+1/7*exp(-1/2*t)*(-7*cos(1/2*7^(1/2)*t)+3*7^(1/2)*sin(1/2*7^(1/2)*t)))

ans = 1.+.143*exp(-.500*t)*(-7.*cos(1.32*t)+7.95*sin(1.32*t))

1
Part (e): G ( s) =
( s + 1) 3

G(t)= 1/2*t^2*exp(-t)

2( s 2 + s + 1)
Part (f): G( s) =
s( s + 15
. )( s 2 + 5s + 5)

G(t)=4/15+28/3*exp(-3/2*t)-

16/5*exp(5/2*t)*(3*cosh(1/2*t*5^(1/2))+5^(1/2)*sinh(1/2*t*5^(1/2)))

2 + 2se − s + 4e −2 s
Part (g): G( s) =
s 2 + 3s + 2

G(t)= 2*exp(-2*t)*(7+8*t)+8*exp(-t)*(-2+t)

2s + 1
Part (h): G(s) =
s + 6s 2 + 11s + 6
3

G(t)= -1/2*exp(-t)+3*exp(-2*t)-5/2*exp(-3*t)

18
3s 3 + 10s 2 + 8s + 5
Part (i): G(s) =
s 4 + 5s 3 + 7 s 2 + 5s + 6

G(t)= -7*exp(-2*t)+10*exp(-3*t)-

1/10*ilaplace(10^(2*s)/(s^2+1)*s,s,t)+1/10*ilaplace(10^(2*s)/(s^2+1),s,t)+1/10*sin(t)*(10+dirac

(t)*(-exp(-3*t)+2*exp(-2*t)))

3-15. Use MATLAB to find the partial-fraction expansion to the following


functions.
10 ( s + 1)
G (s) =
s ( s + 4 )( s + 6 )
2
(a)

G (s) =
( s + 1)
s ( s + 2 ) ( s 2 + 2s + 2 )
(b)
5 ( s + 2)
G (s) =
s ( s + 1)( s + 5)
2
(c)
5e−2 s
G (s) =
(d)
( s + 1) ( s 2 + s + 1)
100 ( s 2 + s + 3)
G (s) =
s ( s 2 + 5s + 3 )
(e)
1
G (s) =
s ( s + 1) ( s + 0.5)
2 2

(f)
2 s 3 + s 2 + 8s + 6
G (s) = 2
(g) ( s + 4)( s 2 + 2s + 2 )
2s 4 + 9s 3 + 15s 2 + s + 2
G (s) =
s 2 ( s + 2 )( s + 1)
2

(h)

MATLAB code:

clear all;

s=tf('s')

19
%Part a

Eq=10*(s+1)/(s^2*(s+4)*(s+6));

[num,den]=tfdata(Eq,'v');

[r,p] = residue(num,den)

%Part b

Eq=(s+1)/(s*(s+2)*(s^2+2*s+2));

[num,den]=tfdata(Eq,'v');

[r,p] = residue(num,den)

%Part c

Eq=5*(s+2)/(s^2*(s+1)*(s+5));

[num,den]=tfdata(Eq,'v');

[r,p] = residue(num,den)

%Part d

Eq=5*(pade(exp(-2*s),1))/(s^2+s+1); %Pade approximation oreder 1 used

[num,den]=tfdata(Eq,'v');

[r,p] = residue(num,den)

%Part e

Eq=100*(s^2+s+3)/(s*(s^2+5*s+3));

[num,den]=tfdata(Eq,'v');

[r,p] = residue(num,den)

%Part f

Eq=1/(s*(s^2+1)*(s+0.5)^2);

[num,den]=tfdata(Eq,'v');

[r,p] = residue(num,den)

20
%Part g

Eq=(2*s^3+s^2+8*s+6)/((s^2+4)*(s^2+2*s+2));

[num,den]=tfdata(Eq,'v');

[r,p] = residue(num,den)

%Part h

Eq=(2*s^4+9*s^3+15*s^2+s+2)/(s^2*(s+2)*(s+1)^2);

[num,den]=tfdata(Eq,'v');

[r,p] = residue(num,den)

The solutions are presented in the form of two vectors, r and p, where for each case, the partial
fraction expansion is equal to:

b( s ) r r r
= 1 + 2 + ... + n
a( s) s − p1 s − p2 s − pn

Following are r and p vectors for each part:

Part(a):

r =0.6944

-0.9375

0.2431

0.4167

p =-6.0000

-4.0000

0
21
Part(b):

r =0.2500

-0.2500 - 0.0000i

-0.2500 + 0.0000i

0.2500

p =-2.0000

-1.0000 + 1.0000i

-1.0000 - 1.0000i

Part(c):

r =0.1500

1.2500

-1.4000

2.0000

p = -5

-1

Part(d):

r =10.0000

-5.0000 - 0.0000i

-5.0000 + 0.0000i

22
p =-1.0000

-0.5000 + 0.8660i

-0.5000 - 0.8660i

Part(e):

r =110.9400

-110.9400

100.0000

p =-4.3028

-0.6972

Part(f):

r =0.2400 + 0.3200i

0.2400 - 0.3200i

-4.4800

-1.6000

4.0000

p =-0.0000 + 1.0000i

-0.0000 - 1.0000i

23
-0.5000

-0.5000

Part(g):

r =-0.1000 + 0.0500i

-0.1000 - 0.0500i

1.1000 + 0.3000i

1.1000 - 0.3000i

p =0.0000 + 2.0000i

0.0000 - 2.0000i

-1.0000 + 1.0000i

-1.0000 - 1.0000i

Part(h):

r =5.0000

-1.0000

9.0000

-2.0000

1.0000

p =-2.0000

-1.0000

24
-1.0000

3-16. Use MATLAB to find the inverse Laplace transforms of the functions in 3-
15.
MATLAB code:

clear all;

syms s

%Part a

Eq=10*(s+1)/(s^2*(s+4)*(s+6));

ilaplace(Eq)

%Part b

Eq=(s+1)/(s*(s+2)*(s^2+2*s+2));

ilaplace(Eq)

%Part c

Eq=5*(s+2)/(s^2*(s+1)*(s+5));

ilaplace(Eq)

%Part d

exp_term=(-s+1)/(s+1) %pade approcimation

Eq=5*exp_term/((s+1)*(s^2+s+1));

ilaplace(Eq)

%Part e

Eq=100*(s^2+s+3)/(s*(s^2+5*s+3));

25
ilaplace(Eq)

%Part f

Eq=1/(s*(s^2+1)*(s+0.5)^2);

ilaplace(Eq)

%Part g

Eq=(2*s^3+s^2+8*s+6)/((s^2+4)*(s^2+2*s+2));

ilaplace(Eq)

%Part h

Eq=(2*s^4+9*s^3+15*s^2+s+2)/(s^2*(s+2)*(s+1)^2);

ilaplace(Eq)

MATLAB Answers:

Part(a):

G(t)= -15/16*exp(-4*t)+25/36*exp(-6*t)+35/144+5/12*t

To simplify:

syms t

digits(3)

vpa(-15/16*exp(-4*t)+25/36*exp(-6*t)+35/144+5/12*t)

ans =-.938*exp(-4.*t)+.694*exp(-6.*t)+.243+.417*tPart(b):

26
G(t)= 1/4*exp(-2*t)+1/4-1/2*exp(-t)*cos(t)

Part(c):

G(t)= 5/4*exp(-t)-7/5+3/20*exp(-5*t)+2*t

Part(d):

G(t)= -5*exp(-1/2*t)*(cos(1/2*3^(1/2)*t)+3^(1/2)*sin(1/2*3^(1/2)*t))+5*(1+2*t)*exp(-t)

Part(e):

G(t)= 100-800/13*exp(-5/2*t)*13^(1/2)*sinh(1/2*t*13^(1/2))

Part(f):

G(t)= 4+12/25*cos(t)-16/25*sin(t)-8/25*exp(-1/2*t)*(5*t+14)

Part(g):

G(t)= -1/5*cos(2*t)-1/10*sin(2*t)+1/5*(11*cos(t)-3*sin(t))*exp(-t)

Part(h):

G(t)= -2+t+5*exp(-2*t)+(-1+9*t)*exp(-t)

27
Problems for Section 3-4

3-17. Solve the following differential equations by means of the Laplace


transform.
d 2 f (t ) df ( t )
2
+ 5 + 4 f ( t ) = e−2t us ( t )
(a) dt dt Assume zero initial conditions.
 df ( t ) 
L  = sF ( s ) − f ( 0 )
 dt 
 d n f (t ) 
 = s F ( s ) − s f ( 0) − s f ( 0) − − f ( n −1) ( 0 )
n n −1 n − 2 (1)
From: L  n
 dt 

 d f (t ) 
  2
2

L 2  = s F ( s ) − sf ( 0 ) − f ( 0 )

 dt  

 df ( t ) 
L  2  = sF ( s ) − f ( 0 )
 dt 

L e −2t  =
1
s+2

(s 2
+ 5s + 4 ) F ( s ) =
1
s+2
1 1
F (s) = = 3
( s + 2 ) ( s + 5s + 4 ) s + 7 s + 14s + 8
2 2

L−1  F ( s )  = − 1/ 2 e-2 t + 1/ 6 e-4 t + 1/ 3 e -t

ilaplace(1/(s^3+7*s^2+14*s+8))
>>
ans = - 1/2 exp(-2 t) + 1/6 exp(-4 t) + 1/3 exp(-t)

28
 dx1 ( t )
 = x2 ( t )
 dt
 dx2 ( t )
 dt = −2 x1 ( t ) − 3x2 ( t ) + us ( t )

 x1 ( 0 ) = 1, x2 ( 0 ) = 0
(b) x = x1
d 2 x (t ) dx ( t )
2
+3 + 2 x ( t ) = us ( t )
dt dt
From
 df ( t ) 
L  = sF ( s ) − f ( 0 )
 dt 
 d f (t ) 
n

 = s F ( s ) − s f ( 0) − s f ( 0) − − f ( n −1) ( 0 )
n n −1 n − 2 (1)
L n
 dt 

 d 2 x ( t )  2
 = s X ( s ) − sx ( 0 ) − x ( 0 ) = s X ( s ) − 1
2
L 2
 dt 

 dx ( t ) 
L  = sX ( s ) − x ( 0 ) = sX ( s ) −1
 dx 

L us ( t ) =
1
s
Or

(s 2
+ 3s + 2 ) X ( s ) =
1
s
1
X (s) =
s ( s + 3s + 2 )
2

ilaplace(1/(s^3+3*s^2+2*s))
ans = 1/2 + 1/2 exp(-2 t) - exp(-t)

(c)

29
 d 3 y (t ) d 2 y ( t ) dy ( t )
 2
+ 2 2
+ + 2 y ( t ) = −e − t u s ( t )
dt dt dt
 2
 d y 0 = −1 dy 0 = 1 y 0 = 0
 dt 2 ( ) dt
( ) ( )
From
 df ( t ) 
L  = sF ( s ) − f ( 0 )
 dt 
 d f (t ) 
n

 = s F ( s ) − s f ( 0) − s f ( 0) − − f ( n −1) ( 0 )
n n −1 n − 2 (1)
L n
 dt 

 d 3 y (t )  3
L 3 
= s Y ( s ) − s 2 y (0) − sy (0) − y (0)
 dt 
 d y (t )  3
3
L 3 
= s Y (s) − s
 dt 

 d 2 y ( t )  2
L 2  = s Y ( s ) − sy ( 0 ) − y ( 0 )
 dt 
 d 2 y ( t )  2
L 2  = s Y (s) − s
 dt 

 dy ( t ) 
L  2  = sY ( s ) − y ( 0 )
 dt 
 dy ( t ) 
L  2  = sY ( s )
 dt 

L −e −t us ( t ) = −
1
s +1

1
s 3Y ( s ) − s + 2s 2Y ( s ) − 2 + sY ( s ) = −
s +1

(s 3
+ 2s 2 + s ) Y ( s ) = −
1
s +1
+ ( s + 2)

s 2 + 3s + 2
Y (s) = −
( s + 1) ( s3 + 2s 2 + s )
y ( t ) = 2 + (t 2 − 3 t − 2) e − t

30
>> ilaplace(((-s^2+3*s+2))/((s+1)*(s^3+2*s^2+s)))

ans =
2
2 + (t - 3 t - 2) exp(-t)
3-18. Use MATLAB to find the Laplace transform of the functions in Problem 3-
17.
MATLAB code:

clear all;

syms t u s x1 x2 Fs

f1 = exp(-2*t)

L1=laplace(f1)/(s^2+5*s+4);

Eq2=solve('s*x1=1+x2','s*x2=-2*x1-3*x2+1','x1','x2')

f2_x1=Eq2.x1

f2_x2=Eq2.x2

f3=solve('(s^3-s+2*s^2+s+2)*Fs=-1+2-(1/(1+s))','Fs')

Here is the solution provided by MATLAB:

Part (a): F(s)=1/(s+2)/(s^2+5*s+4)

Part (b): X1(s)= (4+s)/(2+3*s+s^2)

X2(s)= (s-2)/(2+3*s+s^2)

Part (c): F(s) = s/(1+s)/(s^3+2*s^2+2)

3-19. Use MATLAB to solve the following differential equation:


d2y
− y = et
dt 2 (Assuming zero initial conditions)
MATLAB code:

clear all;

syms s Fs

f3=solve('s^2*Fs-Fs=1/(s-1)','Fs')

31
Answer from MATLAB: Y(s)= 1/(s-1)/(s^2-1)

3-20. A series of a three-reactor tank is arranged as shown in Fig. 3P-20 for


chemical reaction.

Figure 3P-20
The state equation for each reactor is defined as follows:
dC A1 1
R1: = 1000 + 100C A 2 − 1100C A1 − k1V1C A1 
dt V1
dC A 2 1
R2 : = 1100C A1 − 1100C A 2 − k2V2C A 2 
dt V2
dC A3 1
R3 : = 1000C A 2 − 1000C A3 − k3V3C A3 
dt V3
when Vi and ki represent the volume and the temperature constant of each tank as
shown in the following table:
Reactor Vi ki
1 1000 0.1
2 1500 0.2
3 100 0.4

Use MATLAB to solve the differential equations assuming C A1 = C A 2 = C A3 = 0 at


t =0.
MATLAB code:

clear all;

syms s CA1 CA2 CA3

v1=1000;

v2=1500;

v3=100;

32
k1=0.1

k2=0.2

k3=0.4

f1='s*CA1=1/v1*(1000+100*CA2-1100*CA1-k1*v1*CA1)'

f2='s*CA2=1/v2*(1100*CA1-1100*CA2-k2*v2*CA2)'

f3='s*CA3=1/v3*(1000*CA2-1000*CA3-k3*v3*CA3)'

Sol=solve(f1,f2,f3,'CA1','CA2','CA3')

CA1=Sol.CA1

CA3=Sol.CA2

CA4=Sol.CA3

Solution from MATLAB:

CA1(s) =
1000*(s*v2+1100+k2*v2)/(1100000+s^2*v1*v2+1100*s*v1+s*v1*k2*v2+1100*s*v2+1100*k2*
v2+k1*v1*s*v2+1100*k1*v1+k1*v1*k2*v2)

CA3(s) =

1100000/(1100000+s^2*v1*v2+1100*s*v1+s*v1*k2*v2+1100*s*v2+1100*k2*v2+k1*v1*s*v2+
1100*k1*v1+k1*v1*k2*v2)

CA4 (s)=

1100000000/(1100000000+1100000*s*v3+1000*s*v1*k2*v2+1100000*s*v1+1000*k1*v1*s*v2
+1000*k1*v1*k2*v2+1100*s*v1*k3*v3+1100*s*v2*k3*v3+1100*k2*v2*s*v3+1100*k2*v2*k3*
v3+1100*k1*v1*s*v3+1100*k1*v1*k3*v3+1100000*k1*v1+1000*s^2*v1*v2+1100000*s*v2+1
100000*k2*v2+1100000*k3*v3+s^3*v1*v2*v3+1100*s^2*v1*v3+1100*s^2*v2*v3+s^2*v1*v2*
k3*v3+s^2*v1*k2*v2*v3+s*v1*k2*v2*k3*v3+k1*v1*s^2*v2*v3+k1*v1*s*v2*k3*v3+k1*v1*k2*
v2*s*v3+k1*v1*k2*v2*k3*v3)

Problems for Section 3-5


3-21. Fig. 3P-21 shows a simple model of a vehicle suspension system hitting a
bump. If the mass of wheel and its mass moment of inertia are m and J,
respectively, then:
(a) Find the equation of the motion.
33
(b) Determine the transfer function of the system.
(c) Calculate its natural frequency.
(d) Use MATLAB to plot the step response of the system.

Figure 3P-21
1 2
a) Rotational kinetic energy: 𝑇𝑟𝑜𝑡 = 2 𝐽𝜃̇
1
Translational kinetic energy: 𝑇𝑇 = 2 𝑚𝑦̇ 2
Relation between translational displacement and rotational displacement:
𝑦 = 𝑟𝜃
𝑦̇ = 𝑟𝜃̇
1 𝐽 2
𝑇𝑅𝑜𝑡 = 𝑦̇
2 𝑟2
1
Potential energy: 𝑈 = 2 𝐾𝑦 2

From conservation of energy 𝑇𝑅𝑜𝑡 + 𝑇𝑇 + 𝑈 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡, then:

1 𝐽 2 1 1
2
𝑦̇ + 𝑚𝑦̇ 2 + 𝐾𝑦2 = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡
2𝑟 2 2

By differentiating, we have:
𝐽
𝑦̇ 𝑦̈ + 𝑚𝑦̇ 𝑦̈ + 𝐾𝑦𝑦̇ = 0
𝑟2
𝐽
𝑦̇ ( 2 𝑦̈ + 𝑚𝑦̈ + 𝐾𝑦) = 0
𝑟
𝑦̈
Since 𝑦̇ cannot be zero, then 𝐽 𝑟 2 + 𝑚𝑦̈ + 𝐾𝑦 = 0

Alternatively using Newton’s law, take a moment about point P, assuming motion
is counterclockwise, and as the wheel goes above the bump, y is upwards. Also we
assume the system starts from equilibrium (in the vertical direction) where the
34
spring force and the weight of the system cancel each other. So mg does not appear
in the equations. As the wheel moves up the spring compresses by y measured from
the equilibrium.
Assuming positive direction is counterclockwise, we have

 Mom P = − Kyr = J + mry


r
P
y
J 2 + my + Ky = 0
r
b)

Natural frequency is the coefficient of y divided by the coefficient of y

K K
n = =r
m+
J mr 2 + J
r2

Time Response Solution: use a coordinate transformation where the new frame is fixed
to ground on top of the bump with a height “h”. In that case, x(t)=y(t)+h. The new
equation of the system then becomes:

x
J + mx + Kx = Kh
r2

Khr 2
(d) G ( s) =
( J + mr 2 ) s 2 + Kr 2
% select values of m, J and K and use r= 1 and h=0.1 (arbitrary)
%Step input
K=10;
m=1;
r=1;
h=-0.1;
J=m*r^2;
ilaplace(K*h*r^2/(J+m*r^2)/(s*(s^2+K*r^2/(J+m*r^2))))

ans =

0.1000000000 - 0.1000000000 cos(2.236067977 t)

t=0:0.01:20
plot(t,-.1+.1*cos(2.236*t))
xlabel( 'Time(sec)');
ylabel('Amplitude');

35
3-22. An electromechanical system has the following system equations.

di
L + RL + K 1  = e ( t )
dt
d
J + Bω - K 2 i = 0
dt
For a unit-step applied voltage e(t) and zero initial conditions, find responses i(t)
and ω(t). Assume the following parameter values:
L = 1 HmJ = 1kg m 2 , B = 2 N m s, R = 1 , K1 = 1 V s, K 2 = 1 N m / A.

Solution: First find the transfer functions for i(t) and ω(t):

 d ( t )   di ( t )   de ( t ) 
L  = s ( s ) −  (0), L   = sI ( s ) − i(0), L   = sE ( s ) − e(0)
 dt   dt   dt 

Then for zero initial conditions we have:

36
Ls I ( s ) + RL + K 1  ( s ) = E ( s )
Js ( s ) + B ( s ) − K 2 I ( s ) = 0

Js ( s ) + B ( s )
I (s) =
K2
RL + E ( s )
 ( s ) = K2 2
JLs + BLs + K 2 K1
Insert parameter values
1+ E (s)
(s) =
s 2 + 2s +1
1 1 1
(s) = 2 + 2
s + 2s +1 s s + 2s +1
 1 1 1 
I ( s ) = ( s + 2)  2 + 2 
 s + 2s +1 s s + 2s +1 
We can find the time responses through inverse Laplace transforms (e.g. Toolbox
3-4-2), or more easily by using MATLAB simulation (similar to Toolbox 3-4-4).
MATLAB code:
1 1 1 1 s +1
(s) = 2
+ 2 = 2
s + 2s +1 s s + 2s +1 s s + 2s +1
num = [1 1];
den = [1 2 1];
G = tf (num,den);
step(G);
title ('Step Response')
xlabel ('Time (sec')
ylabel ('Amplitude OMG(t)')

37
  1  s + 3s + 2  1  s + 2 
2
1 1 1
I ( s ) = ( s + 2)  2 + 2 =  3 =  2 
 s + 2s +1 s s + 2s +1  s  s + 2s + s  s  s + s 
2

num = [1 2];
den = [1 1 0];
G = tf (num,den);
step(G);
title ('Step Response')
xlabel ('Time (sec')
ylabel ('Amplitude I(t)')

38
3-23. Consider the two-degree-of-freedom mechanical system shown in Fig. 3P-
23, subjected to two applied forces, f1(t) and f2(t), and zero initial conditions.
Determine system responses x1(t) and x2(t) when
f1 ( t ) = 0, f 2 ( t ) = us ( t )
(a)
f1 ( t ) = us ( t ) , f 2 ( t ) = us ( t ) .
(b)
Use the following parameter values:
m1 = m2 = 1 kg , b1 = 2 Ns / m, b2 = 1Ns / m, k1 = k2 = 1N / m .

Figure 3P-23
Starting with the Free Body Diagram, we have

The equations of motion using the Newton’s Law become:


m1 x1 = f1 ( t ) − k1 x1 − b1 x1
m2 x2 = f 2 ( t ) − b2 ( x2 − x1 ) − k2 ( x2 − x1 )

m1 x1 + ( b1 + b2 ) x1 − b2 x2 + ( k1 + k2 ) x1 − k2 x2 = f1 ( t )
m2 x2 − b2 x1 + b2 x2 − k2 x1 + k2 x2 = f 2 ( t )

In Laplace domain with zero initial conditions we get:


 d 2 xi ( t )  2  dxi ( t ) 
L 2  = s Xi (s), L   = sX i ( s )
 dt   dt 
 df ( t ) 
L  i 2  = sFi ( s )
 dt 
i = 1, 2

39
m1s 2 X 1 + ( b1 + b2 ) sX 1 − b2 sX 2 + ( k1 + k2 ) X 1 − k2 X 2 = F1 ( t )
m2 s 2 X 2 − b2 sX 1 + b2 sX 2 − k2 X 1 + k2 X 2 = F2 ( t )

Solve for X1 and X2 transfer functions. In matrix form:


 m1s 2 + ( b1 + b2 ) s + ( k1 + k2 ) −b2 s − k2   X 1   F1 
   =  
 −b2 s − k2 m2 s 2 + b2 s + k2   X 2   F2 
 s 2 + 4s + 2 −2s − 1   X 1   F1 
   =  
 −2s − 1 s 2 + 2s + 2   X 2   F2 

Pre-multiply by the inverse


 s 2 + 4s + 2 −2s − 1 
A= 
 −2s − 1 s + 2s + 2 
2

−1 1  s 2 + 2s + 2 2 s +1 
A = 2 2  
( s + 4s + 2 )( s + 2s + 2 ) − ( −2s − 1)  2s +1 s + 4s + 2
2 2

X 
Solving for  1  we get
X2 
 X1  −1  1 
F 1  s 2 + 2s + 2 2s +1   F1 
X  = A F  =   
 2  ( s + 4s + 2 )( s + 2s + 2 ) − ( 2 s +1)  2s +1 s 2 + 4s + 2   F2 
2
 2
2 2

( s 2 + 2s + 2 ) F1 − ( 2s + 1) F2 
 
 X1  
 ( 2 s + 1) F1 + ( s 2
+ 4 s + 2 ) F 
2
X  =
 2  ( s + 4s + 2 )( s + 2s + 2 ) − ( 2 s +1)
2 2 2

(a)
 − ( 2s + 1)   − ( 2s + 1) 
   
 s   s 
 + ( s 2 + 4s + 2 )   + ( s 2 + 4s + 2 )   − ( 2s + 1) 
 2 
 X1 

 s



 s

 1 ( s + 4s + 2 ) 

X  = 2 = 4 =
 2  ( s + 4s + 2 )( s + 2s + 2 ) − ( 2s +1) s + 6 s 3 + 8s 2 + 8s + 1 s s 4 + 6 s 3 + 8s 2 + 8s + 1
2 2

We can use MATLAB to find the time responses.


x1 :
num = [-2 1];
den = [1 6 8 1];

40
G = tf (num,den);
step(G);
title ('Step Response')
xlabel ('Time (sec')
ylabel ('Amplitude x1(t)')

x2 :
num = [1 4 2];
den = [1 6 8 1];
G = tf (num,den);
step(G);
title ('Step Response')
xlabel ('Time (sec')
ylabel ('Amplitude x2(t)')

41
 ( s 2 + 2s + 2 ) − ( 2s + 1) 
   s2 + 1 
 s   s 
 ( 2s + 1) + ( s + 4s + 2 ) 
2  
   s 2
+ 6 s + 3 
X    =  
(b)  1  =  4 s  s
X2  s + 6 s 3 + 8s 2 + 8s + 1 s 4 + 6 s 3 + 8s 2 + 8s + 1

x1 :
num = [2 0 1];
den = [1 6 8 1];
G = tf (num,den);
step(G);
title ('Step Response')
xlabel ('Time (sec')
ylabel ('Amplitude x1(t)')

x2 :
num = [1 6 3];
den = [1 6 8 1];
G = tf (num,den);
step(G);
title ('Step Response')
xlabel ('Time (sec')
ylabel ('Amplitude x2(t)')

42
Problems for Sections 3-6 and 3-7
3-24. Express the following set of first-order differential equations in the vector-
dx ( t )
= Ax ( t ) + Bu ( t )
matrix form of dt .
dx1 ( t )
= − x1 ( t ) + 2 x2 ( t )
dt
dx2 ( t )
= −2 x2 ( t ) + 3 x3 ( t ) + u1 ( t )
dt
dx3 ( t )
= − x1 ( t ) − 3 x2 ( t ) − x3 ( t ) + u2 ( t )
(a) dt
dx1 ( t )
= − x1 ( t ) + 2 x2 ( t ) + 2u1 ( t )
dt
dx2 ( t )
= 2 x1 ( t ) − x3 ( t ) + u2 ( t )
dt
dx3 ( t )
= 3 x1 ( t ) − 4 x2 ( t ) − x3 ( t )
(b) dt
Solution:
a)
 −1 2 0  0 0 
 u1 (t ) 
A =  0 −2 3  B = 1 0  u (t ) =  
     u 2 (t ) 
 −1 −3 −1 0 1 

b)

43
𝑑𝑥1 (𝑡)
𝑑𝑡
𝑑𝑥2 (𝑡) −1 2 0 𝑥1 (𝑡) 2 0 𝑢 (𝑡)
1
=[ 2 0 −1] [𝑥2 (𝑡)] + [0 1] [ ]
𝑑𝑡 𝑢2 (𝑡)
3 −4 −1 𝑥3 (𝑡) 0 0
𝑑𝑥3 (𝑡)
[ 𝑑𝑡 ]

3-25. Given the state equation of the system, convert it to the set of first-order
differential equation.
 0 −1 2 0 −1
A =  1 0 1  B = 1 0 
 −1 −2 1  0 0 
(a)
 3 1 −2   −1
 
A =  −1 2 2  B =  0 
 0 0 1   2 
(b)
Solution:
𝑑𝑥(𝑡)
= 𝐴𝑥(𝑡) + 𝐵𝑢(𝑡)
𝑑𝑡
a)

𝑑𝑥1 (𝑡)
= −𝑥2 (𝑡) + 2𝑥3 (𝑡) − 𝑢2 (𝑡)
𝑑𝑡
𝑑𝑥2 (𝑡)
= 𝑥1 (𝑡) + 𝑥3 (𝑡) + 𝑢1 (𝑡)
𝑑𝑡
𝑑𝑥3 (𝑡)
{ 𝑑𝑡 = −𝑥1 (𝑡) − 2𝑥2 (𝑡) + 𝑥3 (𝑡)
b)

𝑑𝑥1 (𝑡)
= 3𝑥1 (𝑡) + 𝑥2 (𝑡) − 2𝑥3 (𝑡) − 𝑢(𝑡)
𝑑𝑡
𝑑𝑥2 (𝑡)
= −𝑥1 (𝑡) + 2𝑥2 (𝑡) + 2𝑥3 (𝑡)
𝑑𝑡
𝑑𝑥3 (𝑡)
{ = 𝑥3 (𝑡) + 2𝑢(𝑡)
𝑑𝑡

3-26. Consider a train consisting of an engine and a car, as shown in Fig. 4P-6.

44
Figure 3P-26
A controller is applied to the train so that it has a smooth start and stop, along with
a constant-speed ride. The mass of the engine and the car are M and m,
respectively. The two are held together by a spring with the stiffness coefficient of
K. F represents the force applied by the engine, and  represents the coefficient of
rolling friction. If the train only travels in one direction:
(a) Draw the free-body diagram.
(b) Find the state variables and output equations.
(c) Find the transfer function.
(d) Write the state-space of the system.
Solution:
a)

y2 y1
K ( y1 − y 2 )
m K ( y1 − y 2 ) M F

mgy 2 Mgy1

b) From Newton’s Law:


𝑀𝑦̈ 1 = 𝐹 − 𝐾(𝑦1 − 𝑦2 ) − 𝜇𝑀𝑔𝑦1̇
𝑚𝑦̈ 2 = 𝐾(𝑦1 − 𝑦2 ) − 𝜇𝑚𝑔𝑦2̇
If y1 and y2 are considered as a position and v1 and v2 as velocity variables
𝑦1̇ = 𝑣1
𝑦2̇ = 𝑣2
Then: {
𝑀𝑣1̇ = 𝐹 − 𝐾(𝑦1 − 𝑦2 ) − 𝜇𝑀𝑔𝑣1
𝑚𝑣2̇ = 𝐹 − 𝐾(𝑦1 − 𝑦2 ) − 𝜇𝑚𝑔𝑣2
The output equation can be the velocity of the engine, which means 𝑧 = 𝑣2
c)
𝑀𝑠 2 𝑌1 (𝑠) = 𝐹 − 𝐾(𝑌1 (𝑠) − 𝑌2 (𝑠)) − 𝜇𝑀𝑔𝑠𝑌1 (𝑠)
{ 𝑚𝑠 2 𝑌2 (𝑠) = 𝐾(𝑌1 (𝑠) − 𝑌2 (𝑠)) − 𝜇𝑚𝑔𝑠𝑌2 (𝑠)
𝑍(𝑠) = 𝑉2 (𝑠) = 𝑠𝑌(𝑠)

45
𝑍(𝑠)
Obtaining 𝐹(𝑠) requires solving above equation with respect to Y2(s)

From the first equation:


(𝑀𝑠 2 + 𝐾 + 𝜇𝑀𝑔𝑠)𝑌1 (𝑠) = 𝐹 + 𝐾𝑌2 (𝑠)
𝐹 + 𝐾𝑌2 (𝑠)
𝑌1 (𝑠) =
𝑀𝑠 2 + 𝜇𝑀𝑔𝑠 + 𝐾
Substituting into the second equation:

2
𝐾𝐹 + 𝐾 2 𝑌2 (𝑠)
𝑚𝑠 𝑌2 (𝑠) = − 𝐾𝑌2 (𝑠) − 𝜇𝑚𝑔𝑠𝑌2 (𝑠)
𝑀𝑠 2 + 𝜇𝑀𝑔𝑠 + 𝐾
By solving above equation:
𝑍(𝑠) 𝑠𝑌2 (𝑠)
=
𝐹(𝑠) 𝐹(𝑠)
𝑚𝑠 2 + 𝑚 𝜇𝑔𝑠 + 1
=
𝑀𝑚𝑠 3 + (2𝑀𝑚 𝜇𝑔)𝑠 2 + (𝑀𝑘 + 𝑀𝑚(𝜇𝑔)2 + 𝑚𝑘)𝑠 + 𝐾𝜇𝑔(𝑀 + 𝑚)

c) If y1 and y2 are considered as a position and v1 and v2 as velocity variables


𝑦1̇ = 𝑣1
𝑦2̇ = 𝑣2
Then: {
𝑀𝑣1̇ = 𝐹 − 𝐾(𝑦1 − 𝑦2 ) − 𝜇𝑀𝑔𝑣1
𝑚𝑣2̇ = 𝐹 − 𝐾(𝑦1 − 𝑦2 ) − 𝜇𝑚𝑔𝑣2
The output equation can be the velocity of the engine, which means 𝑧 = 𝑣2

0 0 1 0
𝑦1̇ 0 0 0 1 𝑦1 0
𝑦2̇ 𝐾 𝐾 𝑦2 0
[ ]= − −𝜇𝑔 0 [𝑣 ] + 1 𝐹
𝑦3̇ 𝑚 𝑀 1
𝑦4̇ 𝐾 𝐾 𝑣2 𝑀
− 0 −𝜇𝑔] [0]
[ 𝑚 𝑀
𝑦1
𝑦2
𝑍 = [0 0 0 1] [𝑣 ] + [0]𝐹
1
𝑣2

3-27. A vehicle towing a trailer through a spring-damper coupling hitch is shown


in Fig. 3P-27. The following parameters and variables are defined: M is the mass
of the trailer; Kh, the spring constant of the hitch; Bh, the viscous-damping
coefficient of the hitch; Bt, the viscous-friction coefficient of the trailer; y1(t), the
displacement of the towing vehicle; y2(t), the displacement of the trailer; and f(t),
the force of the towing vehicle.

46
Figure 3P-27
(a) Write the differential equation of the system.
(b) Write the state equations by defining the following state variables:
x1 ( t ) = y1 ( t ) − y2 ( t ) x2 ( t ) = dy2 ( t ) dt
and .
(a) Force equations:
 dy1 − dy2   dy1 − dy2  = M d y2 + B dy2
2

f (t ) = K h ( y1 − y2 ) + Bh   K h ( y1 − y2 ) + Bh  
 dt dt   dt dt  2 t
dt dt
dy 2
(b) State variables: x1 = y1 − y 2 , x 2 =
dt

State equations:
dx1 Kh 1 dx 2 Bt 1
=− x1 + f (t ) =− x2 + f (t )
dt Bh Bh dt M M

3-28. Fig. 3P-28 shows a well-known “ball and beam” system in control systems.
A ball is located on a beam to roll along the length of the beam. A lever arm is
attached to the one end of the beam and a servo gear is attached to the other end of
the lever arm. As the servo gear turns by an angle  , the lever arm goes up and
down, and then the angle of the beam is changed by  . The change in angle
causes the ball to roll along the beam. A controller is desired to manipulate the
ball's position.

Figure 3P-28
Assuming:
m = mass of the ball
47
r = radius of the ball
d = lever arm offset
g = gravitational acceleration
L = length of the beam
J = ball's moment of inertia
p = ball position coordinate
 = beam angle coordinate
 = servo gear angle

(a) Determine the dynamic equation of the motion.


(b) Find the transfer function.
(c) Write the state space of the system.
(d) Find the step response of the system by using MATLAB.

Solution:

Considering the FBD of the ball:

mg β angular acceleration

F x
C
N angle α

a) For a given α, the acceleration at point C will have two components due to
aCx = − p 2
rotation of the beam; that is the centripetal and tangential
aCy =  p
accelerations created by rotation of the bar. Also, we assume a case of rolling
without slipping. Acceleration of the center of mass of the ball relative to the

48
ax = p − p 2
rotating axis x,y,z is where p = −r  (rolling without slipping and
a y = p + 2 p
β is the angular acceleration of the ball).
Note, in the case α is fixed, then ax = p = −r  , which is in line with the rolling
without slipping assumption in a fixed incline case.

From the equation of motion in x direction and by taking a moment about the
center of mass of the ball (see a second year dynamics of rigid bodies text in case
you need to verify the following formula), we get:
 Fx = max = m ( p − p 2 ) = F − mg sin 
Jp
M c . m. = J = −
r
= rF

Combining the above we have

𝐽
( 2 + 𝑚) 𝑝̈ + 𝑚𝑔 sin 𝛼 − 𝑚𝑝𝛼̇ 2 = 0
𝑟

b) As:
𝑑
𝛼= 𝜃
𝐿
Then
𝐽 𝑑𝜃̇ 𝑑
( 2 + 𝑚) 𝑝̈ + 𝑚𝑔 sin ( ) − 𝑚𝑝 𝜃̇ 2 = 0
𝑟 𝐿 𝐿
If we linearize the equation about beam angle α = 0, then sinα ≈ α and sinθ ≈ θ
Then:
𝐽 𝑑
( 2 + 𝑚) 𝑝̈ = −𝑚𝑔 𝜃
𝑟 ℒ
𝐽 𝑚𝑔𝑑
( 2 + 𝑚) 𝑠 2 𝑃(𝑠) = − 𝜃(𝑠)
𝑟 𝐿
𝑃(𝑠) 𝑚𝑔𝑑
=
𝜃(𝑠) 𝑠 2 𝐿 ( 𝐽 + 𝑚)
𝑟2
c) Considering
𝑝̇ = 𝑞
{
𝑝̈ = 𝑞̇

Then the state-space equation is described as:

49
0
𝑝̇ 0 1 𝑝 𝑚𝑔𝑑
[ ]=[ ][ ] + [ ]𝜃
𝑞̇ 0 0 𝑞 𝐽
𝐿 ( 2 + 𝑚)
𝑟
mgd
d) G( s) =
( s L( J / r 2 + m))
2

clear all
% select values of m, d, r, and J
%Step input
g=10;
J=10;
M=1;
D=0.5;
R=1;
L=5;
G=tf([M*g*D],[L*(J/R^2+M) 0 0])
step(G,10)
xlabel( 'Time(sec)');
ylabel('Amplitude');

Transfer function:
5
------
55 s^2

50
3-29. Find the transfer function and state-space variables in problem 2-12.

If the aircraft is at a constant altitude and velocity, and also the change in pitch angle does
not change the speed, then from longitudinal equation, the motion in vertical
plane can be written as:
𝑥
𝑢̇ = − 𝑔 sin 𝜃 − 𝑞𝜔
𝑚
𝑧
𝜔̇ = − 𝑔 cos 𝜃 + 𝑞𝑢
𝑚
𝑀
𝑞̇ =
𝐼𝑦𝑦
{ 𝜃̇ = 𝑞
Where u is axial velocity, ω is vertical velocity, q is pitch rate, and θ is pitch
angle.
Converting the Cartesian components with polar inertial components and replace
x, y, z by T, D, and L. Then we have:

51
1
𝑉̇ = [𝑇 cos 𝛼 − 𝐷 − 𝑚𝑔 sin 𝛾]
𝑚
1
𝛾̇ = [𝑇 sin 𝛼 + 𝐿 − 𝑚𝑔 cos 𝛾]
𝑚𝑉
𝑀
𝑞̇ =
𝐼𝑦𝑦
{ 𝜃̇ = 𝑞
Where α = θ – γ is an attack angle, V is velocity, and γ is flight path angle.
It should be mentioned that T, D, L and M are function of variables α and V.
Refer to the aircraft dynamics textbooks, the state equations can be written as:
𝛼̇ = 𝐴1 𝛼 + 𝐵1 𝑞 + 𝐶1 𝛾
{𝑞̇ = 𝐴2 𝛼 + 𝐵2 𝑞 + 𝐶2 𝛾
𝜃̇ = 𝐴3 𝑞
b) The Laplace transform of the system is:
𝜃(𝑠)
𝐺(𝑠) =
𝛾(𝑠)
By using Laplace transform, we have:
𝑠𝛼(𝑠) = 𝐴1 𝛼(𝑠) + 𝐵1 𝑞(𝑠) + 𝐶1 𝛾(𝑠) (1)
𝑠𝑞(𝑠) = 𝐴2 𝛼(𝑠) + 𝐵2 𝑞(𝑠) + 𝐶2 𝛾(𝑠) (2)
𝑠𝜃(𝑠) = 𝐴3 𝑞(𝑠) (3)
From equation (1):
𝐵1 𝐶1
𝛼(𝑠) = 𝑞(𝑠) + 𝛾(𝑠)
𝑠 − 𝐴1 𝑠 − 𝐴1
Substituting in equation (2) and solving for q(s):
𝐶3 (𝑠 − 𝐴1 ) + 𝐴2 𝐶1
𝑞(𝑠) = 𝛾(𝑠)
𝑠(𝑠 − 𝐴1 ) − 𝐵2 (𝑠 − 𝐴1 ) − 𝐴2 𝐵1
Substituting above expression in equation (3) gives:
𝜃(𝑠) (𝐶2 𝑠 + 𝐴2 𝐶1 − 𝐶2 𝐴1 )𝐴3
= 2
𝛾(𝑠) 𝑠[𝑠 − (𝐴1 + 𝐵2 )𝑠 − (𝐵2 𝐴1 + 𝐴2 𝐵1 )]
If we consider 𝑢 = 𝜔2 sin 𝜔𝑡, then
𝑀𝑦̈ + 𝐵𝑦̇ + 𝐾𝑦 = 𝑚𝑙𝑢
By using Laplace transform:
(𝑀𝑠 2 + 𝐵𝑠 + 𝐾)𝑌(𝑠) = 𝑚𝑙𝑈(𝑠) (4)

Which gives:

52
𝑌(𝑠) 𝑚𝑙
= 2
𝑈(𝑠) 𝑀𝑠 + 𝐵𝑠 + 𝐾

For plotting state flow diagram, equation (4) must be rewritten as:

𝐵 𝐾 𝑚𝑙
(𝑠 + + ) 𝑌(𝑠) = 𝑈(𝑠)
𝑀 𝑀𝑆 𝑀𝑆
or
𝐵 𝐵 𝑋(𝑠)
𝑠𝑌(𝑠) = − 𝑌(𝑠) + 𝑋(𝑠) → 𝑌(𝑠) = − 𝑌(𝑠) +
{ 𝑀 𝑀 𝑠
𝐾 𝑚𝑙
𝑋(𝑠) = − 𝑌(𝑠) + 𝑈(𝑠)
𝑀𝑆 𝑀𝑆

So, the state flow diagram will plotted as:


ml 1/Ms 1 1/s
u y
x
-B/M

-K

3-30. Find the transfer function Y(s)/Tm(s) in problem 2-16.


Recall from (2-16) Torque equation about the motor shaft: Relation between linear
and rotational displacements:

d m d m d m
2 2
y = r m
2
Tm = J m 2
+ Mr 2
+ Bm
dt dt dt

Taking the Laplace transform of the equations in part (a), with zero initial conditions, we have

(
Tm ( s ) = J m + Mr
2
)s 2
m
( s ) + Bm s m ( s ) Y (s) = rm (s)

Transfer function:
Y (s) r
=
Tm ( s ) (
s  J m + Mr
r
)s + B m


3-31. The schematic diagram of a motor-load system is shown in Fig. 3P-31. The
following parameters and variables are defined: Tm(t) is the motor torque; m ( ) ,
 t

the motor velocity; m ( ) , the motor displacement; L ( ) , the load velocity; L ( ) ,


 t  t  t
the load displacement; K, the torsional spring constant; Jm, the motor inertia; Bm,
the motor viscous-friction coefficient; and BL, the load viscous-friction coefficient.
53
(a) Write the torque equations of the system.
 L ( s ) /Tm ( s )  m ( s ) /Tm ( s )
(b) Find the transfer functions and .
(c) Find the characteristic equation of the system.
Tm ( t ) = Tm
(d) Let be a constant applied torque; show that m =  L = constant in
the steady state. Find the steady-state speeds m and L .
(e) Repeat part (d) when the value of JL is doubled, but Jm stays the same.

Figure 3P-31
(a) Torque equations:
d m d m d L d L
2 2

Tm (t ) = J m 2
+ Bm + K ( m −  L ) K ( m −  L ) = J L 2
+ BL
dt dt dt dt

State diagram:

(b) Transfer functions:

L (s) m ( s) J L s + BL s + K
2
K
= =  ( s ) = s  J m J L s + ( Bm J L + BL J m ) s + ( KJ m + KJ L + Bm BL ) s + Bm K 
3 2

Tm ( s ) ( s ) Tm ( s ) ( s )

(c) Characteristic equation: ( s) = 0


Tm
(d) Steady-state performance: Tm ( t ) = Tm = constant. Tm ( s ) = .
s

54
J L s + BL s + K
2
1
lim  m (t ) = lim s m ( s ) = lim =
J m J L s + ( Bm J L + BL J m ) s + ( KJ m + KJ L + Bm BL ) s + Bm K
3 2
t → s →0 s →0 Bm

Thus, in the steady state,  m =  L .

(e) The steady-state values of  m and  L do not depend on J m and J L .

3-32. In problem 2-20,


(a) Assume that Ts is a constant torque. Find the transfer function  ( s ) / ( s ) ,
where  ( s ) and  ( s ) are the Laplace transforms of  ( t ) and  ( t ) , respectively.
Assume that  ( t ) is very small.
(b) Repeat part (a) with points C and P interchanged. The d1 in the expression of
 F should be changed to d2.

(Recall) Torque equation: (About the center of gravity C)


d 
2
J 2
= Ts d 2 sin + Fd d1 Fa d1 = J   1 = K F d1 sin   
dt
d  d 
2 2
Thus, J 2
= Ts d 2 + K F d1 J 2
− K F d1 = Ts d 2
dt dt
(a) Js2( s) − KF d1( s) = Ts d2 ( s)

(b) With C and P interchanged, the torque equation about C is:


d d
2 2

Ts ( d1 + d 2 )  + F d 2 = J 2
Ts ( d1 + d 2 )  + K F d 2 = J 2
dt dt

( s ) Ts ( d1 + d 2 )
Js ( s ) − K F d 2 ( s ) = Ts ( d1 + d 2 )  ( s ) =
2

( s) Js − K F d 2
2

3-33. In problem 2-21,


(a) Express the equations obtained in earlier as state equations by assigning the
state variables as x1 =  , x2 = d /dt , x3 = x,and x4 = dx/dt . Simplify these equations
for small  by making the approximations sin    and cos  1 .
(b) Obtain a small-signal linearized state-equation model for the system in the
form of
d x ( t )
= A*x ( t ) + B*r ( t )
dt

55
x01 ( t ) = 1, x02 ( t ) = 0, x03 ( t ) = 0 x04 ( t ) = 0
at the equilibrium point , and .
(Recall) Nonlinear differential equations:
dx ( t ) dv ( t )
= v (t ) = − k ( v ) − g ( x ) + f ( t ) = − Bv ( t ) + f ( t )
dt dt
With Ra = 0 ,
e( t ) e( t 0
 (t ) = = K f i f ( t ) = K f i f ( t ) = K f ia ( t ) Then, ia ( t ) =
Kb v ( t ) Kb K f v ( t )

2
Ki e ( t ) dv ( t ) Ki
f ( t ) = Ki ( t )ia ( t ) =
2
2 2
. Thus, = − Bv ( t ) + 2 2
e (t )
Kb K f v (t ) dt Kb K f v (t )

(a) State equations: ia (t ) as input.


dx ( t ) dv ( t ) 2
= v (t ) = − Bv ( t ) + Ki K f ia ( t )
dt dt

(b) State equations:  (t ) as input.


2  (t )
f ( t ) = Ki K f ia ( t ) ia ( t ) = i f ( t ) =
Kf

dx ( t ) dv ( t ) Ki
 (t )
2
= v(t ) = − Bv ( t ) +
dt dt Kf

3-34. Vibration absorbers are used to protect machines that work at the constant
speed from steady-state harmonic disturbance. Fig. 3P-34 shows a simple
vibration absorber.

Figure 3P-34
F ( t ) = Asin (t )
Assuming the harmonic force is the disturbance applied to the
mass M:
(a) Derive the state space of the system.

56
(b) Determine the transfer function of the system.
Solutions:
F ( t ) = Asin (t )
a) Assuming the harmonic force is the disturbance applied to the
mass M, derive the equations of motion of the system.
summation of vertical forces gives:
My = f ( t ) − Ky − k ( y − x ) − Ky
mx = k ( y − x )

My + ( 2 K + k ) y − kx = f ( t )
mx − ky + kx = 0
Where f ( t ) = Asin (t )

If we consider 𝑦̇ = 𝑞 and 𝑥̇ = 𝑟, then:


𝑀𝑞̇ + (2𝐾 + 𝑘)𝑦 − 𝑘𝑥 = 𝐹
{
𝑚𝑟̇ − 𝑘𝑦 + 𝑘𝑥 = 0
The state-space model is:
0 0 1 0
0 0 0 1 𝑦 0
𝑦̇
−2𝐾 −𝑘 0
[𝑥̇ ] = 𝑘 𝑥] + 1 𝐹
0 0 [𝑞
𝑞̇ 𝑀
𝑟̇ 𝑘 𝑟 𝑀
𝑘 0 0] [0]
[ 𝑚
𝑌(𝑠)
b) 𝐺(𝑠) = 𝑋(𝑠)

By applying Laplace transform for equations (1) and (2), we obtain:


[𝑀𝑠 2 + (2𝐾 + 𝑘)]𝑌(𝑠) − 𝑘𝑋(𝑠) = 𝐹(𝑠)
{
(𝑚𝑠 2 + 𝑘)𝑋(𝑠) = 𝑘𝑌(𝑠)
Which gives:
𝑘
𝑋(𝑠) = 𝑌(𝑠)
𝑚𝑠 𝑠+𝑘
and
2
𝑘2
[𝑀𝑠 + (2𝐾 + 𝑘) − ] 𝑌(𝑠) = 𝐹(𝑠)
𝑚𝑠 2 + 𝑘
Therefore:
𝑌(𝑠) 𝑚𝑠 2 + 𝑘
=
𝐹(𝑠) 𝑀𝑚𝑠 4 + (𝑀𝑘 + 2𝐾𝑚 + 𝑚𝑘)𝑠 2 + 2𝐾𝑘
57
3-35. Fig. 3P-35 represents a damping in the vibration absorption.
F ( t ) = Asin (t )
Assuming the harmonic force is the disturbance applied to the
mass M:
(a) Derive the state space of the system.
(b) Determine the transfer function of the system.

Figure 3P-35
a) Summation of vertical forces gives:
𝑀𝑦̈ + (𝐵 + 𝑏)𝑦̇ − 𝑏𝑥̇ + (𝐾 + 𝑘)𝑦 − 𝑘𝑥 = 𝐹
{
𝑚𝑥̈ − 𝑏𝑦̇ + 𝑏𝑥̇ − 𝑘𝑦 − 𝑘𝑥 = 0
Consider 𝑦̇ = 𝑞 and 𝑥̇ = 𝑟, then
𝑀𝑞̇ + (𝐵 + 𝑏)𝑞 − 𝑏𝑟 + (𝐾 + 𝑘)𝑦 − 𝑘𝑥 = 𝐹
{
𝑚𝑟̇ − 𝑏𝑞 + 𝑏𝑟 − 𝑘𝑦 − 𝑘𝑥 = 0
So, the state-space model of the system is:
0 0 1 0
0 0 0 1 0
𝑦̇ 𝑦
−(𝐾 + 𝑘) 𝐾𝑘 𝐵+𝑏 𝑏 0
[𝑥̇ ] = − [𝑥 ] + 1 𝐹
𝑞̇ 𝑀 𝑀 𝑀 𝑀 𝑞
𝑟̇ 𝑘 𝑘 𝑏 𝑏 𝑟 𝑀
− ] [ 0]
[ 𝑀 𝑚 𝑚 𝑚
b) The Laplace transform of the system is defined by:
𝑌(𝑠)
𝐺(𝑠) =
𝑋(𝑠)
where
(𝑀𝑠 2 + (𝐵 + 𝑏)𝑠 + (𝐾 + 𝑘))𝑌(𝑠) − (𝑏𝑠 + 𝐾)𝑋(𝑠) = 𝐹(𝑠)
{
(𝑚𝑠 2 + 𝑏𝑠 − 𝑘)𝑋(𝑠) = (𝑏𝑠 + 𝑘)𝑌(𝑠)
as a result:

58
𝑏𝑠 + 𝑘
𝑋(𝑠) = 𝑌(𝑠)
𝑚𝑠 2 + 𝑏𝑠 − 𝑘
Substituting into above equation:
[(𝑀𝑠 2 + (𝐵 + 𝑏)𝑠 + (𝐾 + 𝑘))(𝑚𝑠 2 + 𝑏𝑠 + 𝑘) − (𝑏𝑠 + 𝑘)2 ]𝑌(𝑠)
= (𝑚𝑠 2 + 𝑏𝑠 − 𝑘)𝐹(𝑠)

𝑌(𝑠) 𝑚𝑠 2 + 𝑏𝑠 − 𝑘
=
𝑋(𝑠) [𝑀𝑠 2 + (𝐵 + 𝑏)𝑠 + (𝐾 + 𝑘)][𝑚𝑠 2 + 𝑏𝑠 − 𝑘] − (𝑏𝑠 + 𝑘)2

3-36. Consider the electrical circuits shown in Figs. 3P-36(a) and (b).

Figure 3P-36
For each circuit:
(a) Find the dynamic equations and state variables.
(b) Determine the transfer function.
(c) Use MATALB to plot the step response of the system.
a) According to the circuit:
𝑣𝑖𝑛 − 𝑣1 𝑑 𝑣𝑜𝑢𝑡 − 𝑣1
+ 𝐶 𝑣1 + =0
2𝑅 𝑑𝑡 2𝑅
𝐶 𝑑 𝑣2 𝐶 𝑑
(𝑣𝑖𝑛 − 𝑣2 ) − + (𝑣 − 𝑣2 ) = 0
2 𝑑𝑡 𝑅 2 𝑑𝑡 𝑜𝑢𝑡
𝐶𝑑 𝑣1 − 𝑣𝑜𝑢𝑡
(𝑣2 − 𝑣𝑜𝑢𝑡 ) + =0
{ 2 𝑑𝑡 2𝑅
By using Laplace transform we have:

59
Vin (s) − V1 (s) Vout (s) − V1 (s)
+ CsV1 (s) + =0
2R 2R
Cs V2 (s) Cs
(Vin (s) − V2 (s)) − + (Vout (s) − V2 (s)) = 0
2 R 2
Cs V1 (s) − Vout (s)
{ (V2 (s) − Vout (s)) + =0
2 2R
From above equations:
1
V1 (s) = (V (s) + Vout (s))
2(RCS + 1) in
RCS
V2 (s) = (V (s) + Vout (s))
{ 2(RCS + 1) in
Substituting V1(s) and V2(s) into preceding equations, we obtain:
𝑉𝑜𝑢𝑡 (𝑠) 𝑅2𝐶 2 𝑠 2 + 1
= 2 2 2
𝑉𝑖𝑛 (𝑠) 𝑅 𝐶 𝑠 + 4𝑅𝐶𝑠 + 1
b) Measuring Vout requires a load resistor, which means:
L1 L2
r R

i1 i2 RL
Vin VC1 VC 2 C2
C1

Then we have:
𝑑
𝐿1 𝑖 = 𝑣𝑖𝑛 − 𝑟𝑖1 − 𝑣𝐶1
𝑑𝑡 1
𝑑
𝐶1 𝑣𝐶1 = 𝑖1 − 𝑖2
𝑑𝑡
𝑑
𝐿2 𝑖2 = 𝑣𝐶1 − 𝑣𝐶2
𝑑𝑡
𝑑 𝑣𝐶2
𝐶2 𝑣𝐶2 = 𝑖2 −
{ 𝑑𝑡 𝑅 + 𝑅𝐿
When
𝑅𝐿
𝑣𝑜𝑢𝑡 = 𝑣
𝑅 + 𝑅𝐿 𝐶2
If RL >>R, then 𝑣𝑜𝑢𝑡 = 𝑣𝐶2
By using Laplace transform we have:

60
𝐿1 𝑠𝐼1 (𝑠) = 𝑉𝑖𝑛 (𝑠) − 𝑟𝐼1 (𝑠) − 𝑉𝐶1 (𝑠)
𝐶1 𝑠𝑉𝐶1 (𝑠) = 𝐼1 (𝑠) − 𝐼2 (𝑠)
𝐿2 𝑠𝐼2 (𝑠) = 𝑉𝐶1 (𝑠) − 𝑉𝐶2 (𝑠)
𝑉𝐶2 (𝑠)
𝐶2 𝑠𝑉𝐶2 (𝑠) = 𝐼2 (𝑠) −
{ 𝑅 + 𝑅𝐿
Therefore:
𝐶2 (𝑅 + 𝑅𝐿 ) + 1
𝐼2 (𝑠) = 𝑉𝐶2 (𝑠)
𝑅 + 𝑅𝐿
𝐿2 𝐶2 𝑠(𝑅 + 𝑅𝐿 ) + 𝑠 + (𝑅 + 𝑅𝐿 )
𝑉𝐶1 (𝑠) = 𝑉𝐶2 (𝑠)
𝑅 + 𝑅𝐿
𝐿2 𝐶2 𝐶1 𝑠 2 (𝑅 + 𝑅𝐿 ) + 𝐶1 𝑠 2 + 𝐶1 𝑠(𝑅 + 𝑅𝐿 ) + 𝐶2 (𝑅 + 𝑅𝐿 ) + 1
𝐼1 (𝑠) = 𝑉𝐶2
𝑅 + 𝑅𝐿
𝑉𝐶2 (𝑠)
can be obtained by substituting above expressions into the first equation of
𝑉𝑖𝑛 (𝑠)
the state variables of the system.

3-37. The following differential equations represent linear time-invariant


systems. Write the dynamic equations (state equations and output equations) in
vector-matrix form.
d 2 y (t ) dy ( t )
2
+4 + y ( t ) = 5r ( t )
(a) dt dt

d 3 y (t ) d 2 y (t ) dy ( t )
2 + 3 + 5 + 2 y (t ) = r (t )
(b) dt 3 dt 2 dt

d 3 y (t ) d 2 y (t ) dy ( t )
+ y ( t ) +  y ( ) d = r ( )
t
3
+ 5 2
+3
(c) dt dt dt 0

d 4 y (t ) d 3 y (t ) dy ( t )
4
+ 1.5 3
+ 2.5 + y ( t ) = 2r ( t )
(d) dt dt dt
dy
(a) State variables: x1 = y, x 2 =
dt
State equations: Output equation:

 dx1 
 dt   0 1   x1   0   x1 
 =  + r y = 1 0   = x1
 dx2   −1 −4   x2   5   x2 
 dt 

61
2
dy d y
(b) State variables: x1 = y, x 2 = , x3 = 2
dt dt

State equations: Output equation:

 dx1 
 dt 
  0 1 0   x1   0   x1 
 = 0  1   x2  +  0  r y = 1 0 0  x2  = x1
dx 2
0
 dt        
 dx   −1 −2.5 −1.5   x3  0.5   x3 
 3
 dt 
2
dx1 dy d y

t
(c) State variables: x1 = y ( ) d , x2 = , x3 = , x4 = 2
0
dt dt dt

State equations: Output equation:

 x1   0 1 0 0   x1  0   x1 
 x   0 0 1 0   x  0  x 
 2 =   2 + r y = 1 0 0 0    = x1
2

 x3   0 0 0 1   x3  0   x3 
        
 x4   −1 −1 −3 −5   x4  1   x4 
2 3
dy d y d y
(d) State variables: x1 = y, x 2 = , x3 = 2
, x4 = 3
dt dt dt

State equations: Output equation:

 x1   0 1 0 0   x1 
0   x1 
x   0 0 1 0   x2   0  x 
 2 =   + r y = 1 0 0 0    = x1
2

 x3   0 0 0 1   x3   0   3
x
        
 x4   −1 −2.5 0 −1.5   x4  1   x4 

3-38. The following transfer functions show linear time-invariant systems. Write
the dynamic equations (state equations and output equations) in vector-matrix
form.
s+3
G (s) =
(a) s + 3s + 2
2

6
G (s) =
(b) s + +6s + 11s + 6
3 2

s+2
G (s) =
(c) s + 7 s + 12
2

62
s 3 + 11s 2 + 35s + 250
G (s) =
s 2 ( s 3 + 4s 2 + 39s + 108 )
(d)
𝑌(𝑠) 𝑠+3
a) 𝐺(𝑠) = 𝑈(𝑠) = 𝑠2 +3𝑠+2

 (𝑠 2 + 3𝑠 + 2)𝑌(𝑠) = (𝑠 + 3)𝑈(𝑠)
2 3
 𝑠𝑌(𝑠) + 3𝑌(𝑠) = − 𝑠 𝑌(𝑠) + 5 𝑈(𝑠) + 𝑉(𝑠)
2 3
Let 𝑋(𝑠) = − 𝑠 𝑌(𝑠) + 5 𝑈(𝑠)
𝑠𝑌(𝑠) = 𝑋(𝑠) + 𝑈(𝑠) + 3𝑌(𝑠) 𝑦̇ = −3𝑦 + 𝑥 + 𝑢
Then {  {
𝑠𝑋(𝑠) = −2𝑌(𝑠) + 3𝑈(𝑠) 𝑥̇ = −2𝑦 + 3𝑢

If 𝑦 = 𝑥1 and 𝑥 = 𝑥2 , then

𝑥1̇ = −3𝑥1 + 𝑥2 + 𝑢
{
𝑥̇ 2 = −2𝑥1 + 3𝑢
or
𝑥̇ −3 +1 𝑥1 1
[ 1] = [ ][ ] + [ ]𝑢
𝑥̇ 2 −2 0 𝑥2 3

𝑥1
𝑦 = [1 0 ] [ 𝑥 ]
2

𝑌(𝑠) 6
b) 𝐺(𝑠) = 𝑈(𝑠) = 𝑠3 +6𝑠2 +11𝑠+6

 𝑌(𝑠)(𝑠 3 + 6𝑠 2 + 11𝑠 + 6) = 6𝑈(𝑠)


6 11 6
𝑠𝑌(𝑠) + 6𝑌(𝑠) = − 𝑠2 𝑌(𝑠) − 𝑌(𝑠) + 𝑠2 𝑈(𝑠)
𝑠
6 11 6 6
Let X(s) = − s2 𝑌(𝑠) − 𝑌(𝑠) + 𝑠 𝑈(𝑠), therefore 𝑠𝑋(𝑠) = − 𝑠 𝑌(𝑠) −
𝑠
6 6 6
11𝑌(𝑠) + 𝑠 𝑈(𝑠) and Let 𝑍(𝑠) = − 𝑠 𝑌(𝑠) + 𝑠 𝑈(𝑠), then 𝑠𝑍(𝑠) = −6𝑌(𝑠) +
6𝑈(𝑠). As a result:
𝑠𝑌(𝑠) = −6𝑌(𝑠) + 𝑋(𝑠)
{𝑠𝑋(𝑠) = −11𝑌(𝑠) + 𝑍(𝑠)
𝑠𝑍(𝑠) = −6𝑌(𝑠) + 6𝑈(𝑠)
or
𝑦̇ = −6𝑦 + 𝑥
{𝑥̇ = −11𝑦 + 𝑧
𝑧̇ = −6𝑦 + 6𝑢
If 𝑦 = 𝑥1 , 𝑥 = 𝑥2 𝑎𝑛𝑑 𝑧 = 𝑥3 , then
𝑥1̇ −6 1 0 𝑥1 0
[𝑥̇ 2 ] = [−11 0 1] [𝑥2 ] + [0] u
𝑥̇ 3 −6 0 0 𝑥3 6

63
𝑥1
𝑦 = [1 0 0] [𝑥2 ]
𝑥3
𝑌(𝑠) 𝑠+2
c) 𝐺(𝑠) = 𝑈(𝑠) = 𝑠2 +7𝑠+12

𝑌(𝑠)(𝑠 2 + 7𝑠 + 12) = (𝑠 + 2)𝑈(𝑠)


12 2
𝑠𝑌(𝑠) = −7𝑌(𝑠) − 𝑌(𝑠) + 𝑈(𝑠) + 𝑠 𝑈(𝑠)
𝑠
12 2
Let 𝑠𝑋(𝑠) = − 𝑌(𝑠) + 𝑠 𝑈(𝑠), then 𝑠𝑋(𝑠) = −12𝑌(𝑠) + 2𝑈(𝑠). As a
𝑠
result:
𝑦̇ = −7𝑦 + 𝑥 + 𝑢
{
𝑥̇ = −12𝑦 + 2𝑢
Let 𝑦 = 𝑥1 and 𝑥 = 𝑥2 , then
𝑥1 −7 1 𝑥1 1
[𝑥 ] = [ ][ ] + [ ]𝑢
2 −12 0 𝑥2 2
𝑥1
𝑦 = [1 0 ] [ 𝑥 ]
2
𝑌(𝑠) 𝑠3 +11𝑠2 +35𝑠+250
d) 𝐺(𝑠) = 𝑈(𝑠) = 𝑠2 (𝑠3 +4𝑠2 +39𝑠+108)
35 250
 (𝑠 3 + 4𝑠 + 39𝑠 + 108)𝑌(𝑠) = [𝑠 + 11 + + ] 𝑢(𝑠)
𝑠 𝑠2
39 108 1 11 35 250
 𝑠𝑌(𝑠) = −4𝑌(𝑠) + 𝑌(𝑠) + 𝑌(𝑠) + [𝑠 + 𝑠2 + 𝑠3 + ] 𝑈(𝑠)
𝑠 𝑠2 𝑠4

39 108 1 11 35 250
Let X 2 (s) = 𝑌(𝑠) + 𝑌(𝑠) + [𝑠 + 𝑠2 + 𝑠3 + ] 𝑈(𝑠), then
𝑠 𝑠2 𝑠4
108 11 35 250
𝑠𝑋2 (𝑠) = 39𝑌(𝑠) + 𝑌(𝑠) + 𝑈(𝑠) + [ 𝑠2 + 𝑠3 + ] 𝑈(𝑠)
𝑠 𝑠4
108 11 35 250
Now, let 𝑋3 (𝑠) = 𝑌(𝑠) + 𝑠2 𝑈(𝑠) + 𝑠3 𝑈(𝑠) + 𝑠4 𝑈(𝑠), therefore
𝑠
sX2 (s) = 39Y(s) + X3 (s) + U(s)
{ 11 35 250
sX3 (s) = 108Y(s) + U(s) + 2 𝑈(𝑠) + 3 𝑈(𝑠)
s s 𝑠
11 35 250
Let X 4 (s) = s U(s) + s2 𝑈(𝑠) + 𝑠3 𝑈(𝑠), then 𝑠𝑋4 (𝑠) = 11𝑈(𝑠) +
35 250
𝑈(𝑠) + 𝑈(𝑠)
𝑠 𝑠2
35 250 250
Let X 5 (s) = 𝑈(𝑠) + 𝑈(𝑠), or 𝑠𝑋5 (𝑠) = 35𝑈(𝑠) + 𝑈(𝑠)
𝑠 𝑠2 𝑠
250
Let 𝑋6 (𝑠) = 𝑈(𝑠) , then 𝑠𝑋6 (𝑠) = 250𝑈(𝑠). If 𝑌(𝑠) = 𝑋1 (𝑠), then:
𝑠
𝑥̇ 1 = −4𝑥1 + 𝑥2
𝑥̇ 2 = 39𝑥1 + 𝑥2 + 𝑢
𝑥̇ 3 = 108𝑥1 + 𝑥4
𝑥̇ 4 = 11𝑢 + 𝑥5
𝑥̇ 5 = 35𝑢 + 36𝑥6
{ 𝑥̇ 6 = 250𝑢
or

64
𝑥̇ 1 −4 1 0 0 0 0 𝑥1 0
𝑥̇ 2 39 0 1 0 0 0 𝑥2 1
𝑥̇ 3 108 0 0 1 0 0 3 𝑥
= + 0 𝑢
𝑥̇ 4 0 0 0 0 1 0 𝑥4 11
𝑥̇ 5 0 0 0 0 0 1 𝑥5 35
[𝑥̇ 6 ] [ 0 0 0 0 0 [
0] 6𝑥 ] [ 250]

3-39. Repeat Problem 3-38 by using MATLAB.


𝑌(𝑠) 𝑠+3
𝐺(𝑠) = = 2
𝑈(𝑠) 𝑠 + 3𝑠 + 2

The state variables are defined as

x1 ( t ) = y ( t )
dy ( t )
x2 ( t ) =
dt

Then the state equations are represented by the vector-matrix equation

dx ( t )
= Ax ( t ) + Bu ( t )
dt

where x(t) is the 2  1 state vector, u(t) the scalar input, and

0 1  3
A=  B= 
 −2 −3 1
C = 1 0 D=0

G ( s ) = C ( sI − A ) B + D
−1

65
MATLAB
>> clear all
>> syms s
>> A=[0,1;-2,-3]
A=
0 1
-2 -3
>> B=[0;1]
B=
0
1
>> C=[3,1]
C=
3 1
>> s*eye(2)-A
ans =
[ s, -1]
[ 2, s+3]
>> inv(ans)
ans =
[ (s+3)/(s^2+3*s+2), 1/(s^2+3*s+2)]
[ -2/(s^2+3*s+2), s/(s^2+3*s+2)]
>> C*ans*B
ans =
3/(s^2+3*s+2)+s/(s^2+3*s+2)
Use ACSYS as demonstrated in section 10-19-2
1) Activate MATLAB
2) Go to the folder containing ACSYS
3) Type in Acsys
4) Click the “Transfer Function Symbolic” pushbutton
5) Enter the transfer function
6) Use the “State Space” option as shown below:

66
You get the next window. Enter the A,B,C, and D values.

67
-------------------------------------------------------------
State Space Analysis
-------------------------------------------------------------
Inputs:
A=| 0 1| B=|0|
|-2 -3| |1|
C=|3 1| D=|0|
State Space Representation:
Dx = | 0 1|x + |0|u
|-2 -3| |1|
y = |3 1|x + |0|u
Determinant of (s*I-A):
2
s +3s+2

68
Characteristic Equation of the Transfer Function:
2
s +3s+2
The eigen values of A and poles of the Transfer Function are:
-1
-2
Inverse of (s*I-A) is:
[ s+3 1 ]
[ ------------ ------------]
[ 2 2 ]
[s +3s+2 s + 3 s + 2]
[ ]
[ 2 s ]
[- ------------ ------------]
[ 2 2 ]
[ s +3s+2 s + 3 s + 2]
State transition matrix (phi) of A:
[ 2 exp(-t) - exp(-2 t) exp(-t) - exp(-2 t) ]
[ ]
[-2 exp(-t) + 2 exp(-2 t) -exp(-t) + 2 exp(-2 t)]
Transfer function between u(t)and y(t) is:
s+3
------------
2
s +3s+2
No Initial Conditions Specified
States (X) in Laplace Domain:
[ 1 ]
[---------------]
[(s + 2) (s + 1)]
[ ]
[ s ]

69
[---------------]
[(s + 2) (s + 1)]
Inverse Laplace x(t):
[ exp(-t) - exp(-2 t) ]
[ ]
[-exp(-t) + 2 exp(-2 t)]
Output Y(s):
s+3
---------------
(s + 2) (s + 1)
Inverse Laplace y(t):
2 exp(-t) - exp(-2 t)

70
Use the same procedure for parts b, c and d.

3-40. Find the time response of the following systems:


 x1   0 1   x1  0 
 x  =  −2 −3  x  + 1  u
(a)  2   2  

 x1   −1 −0.5  x1  0.5 x 
x  =  1    +   uy = 1 0  1 
(b)  2  0   x2  0   x2 
𝑠 −1 1 𝑠+3 1
a) 𝑥̇ = 𝐴𝑥 + 𝐵𝑢 ➔𝑠𝐼 − 𝐴 = [ ] and (𝑠𝐼 − 𝐴)−1 = 𝑠2 +3𝑠+2 [ ]
2 𝑠+3 −2 𝑠
Therefore:
−𝑡 −2𝑡
𝛷(𝑡) = 𝐿−1 {(𝑠𝐼 − 𝐴)−1 } = [ 2𝑒 −𝑡 − 𝑒 −2𝑡 𝑒 −𝑡 − 𝑒 −2𝑡 ]
−2𝑒 + 2𝑒 −𝑒 −𝑡 + 2𝑒 −2𝑡
𝑒 −𝑡 + 0.5𝑒 −2𝑡 ]
If 𝑥(0) = 0, then 𝑥(𝑡) = ∫0 𝛷(𝑡 − 𝜏)𝐵𝑢(𝑡)𝑑 𝜏 = [0.5 − −𝑡
𝑡
𝑒 − 𝑒 −2𝑡
b) 𝛷(𝑡) = 𝐿−1 {(𝑠𝐼 − 𝐴)−1 }
1 𝑠 −0.5
= 𝐿−1 {𝑠2 +𝑠+0.5 [ ]}
1 𝑠+1
𝑒 −0.5𝑡 (𝑐𝑜𝑠 0.5𝑡 − 𝑠𝑖𝑛 0.5𝑡) 𝑒 −0.5𝑡 𝑠𝑖𝑛 0.5𝑡
=[ ]
2𝑒 −0.5𝑡 𝑠𝑖𝑛 0.5𝑡 𝑒 −0.5𝑡 (𝑐𝑜𝑠 5𝑡 + 𝑠𝑖𝑛 0.5𝑡)
If x(0) = 0, then
0 1 0.5𝑒 −0.5𝑡 (𝑐𝑜𝑠 0.5𝑡 – 𝑠𝑖𝑛 0.5𝑡) − 0.5
𝑥(𝑡) = 𝐴−1 (𝑒 𝐴𝑡 − 𝐼)𝐵 = [ ][ ]
−2 −2 𝑒 −0.5𝑡 − 𝑠𝑖𝑛 0.5𝑡
𝑒 −0.5𝑡 𝑠𝑖𝑛 5𝑡
= [ −0.5𝑡 ]
−𝑒 (𝑐𝑜𝑠 0.5𝑡 + 𝑠𝑖𝑛0.5𝑡) + 1
and
x1
y(t) = [1 0] [x ] = x1 = e−0.5t sin 0.5t
2

3-41. Given a system described by the dynamic equations:


dx ( t )
= Ax ( t ) + Bu ( t ) y ( t ) = Cx ( t )
dt
0 1 0 0 
A =  0 0 1  B = 0  C = 1 0 0
 
 −1 −2 −3 1 
(a)
 −1 1  0
A=  B =   C = 1 1
(b)  0 −1 1 

71
0 1 0  0 
A = 0 0 1  B = 0  C = 1 1 0
 
0 −1 −2 1 
(c)
(1) Find the eigenvalues of A.
(2) Find the transfer-function relation between X(s) and U(s).
(3) Find the transfer function Y(s)/U(s).
(a) (1) Eigenvalues of A: 2.325, − 0.3376 + j 0.5623, − 0.3376 − j 0.5623

(2) Transfer function relation:

 s 2 + 3s + 2 1  0 
−1
s −1 0  0 s+3 1
1  1   
−1   0  U ( s ) =
1  
X ( s ) = ( sI − A ) B U ( s ) = s ( s + 3) s 0 U ( s) =
−1
0 s −1 s U (s)
(s)     (s)    (s)  2 
1 2 s + 3 1   −s −2 s − 1 s  1 
2
 s 

3 2
( s) = s + 3s + 2 s + 1

(3) Output transfer function:


1
Y (s) 1   1
= C( s ) ( sI − A ) B = 1 0
−1
0 s = 3
 ( s )  2  s + 3s + 2 s + 1
2
U (s)
 s 

USE ACSYS as illustrated in section 10-19-1


1) Activate MATLAB
2) Go to the folder containing ACSYS
3) Type in Acsys
4) Click the “State Space” pushbutton
5) Enter the A,B,C, and D values. Note C must be entered here and must have the
same number of columns as A. We us [1,1] arbitrarily as it will not affect the
eigenvalues.
6) Use the “Calculate/Display” menu and find the eigenvalues and other State space
calculations.

72
The A matrix is:
Amat =
0 1 0
0 0 1
-1 -2 -3
Characteristic Polynomial:
ans =

73
s^3+3*s^2+2*s+1
Eigenvalues of A = Diagonal Canonical Form of A is:
Abar =
-2.3247 0 0
0 -0.3376 + 0.5623i 0
0 0 -0.3376 - 0.5623i
Eigen Vectors are
T=
0.1676 0.7868 0.7868
-0.3896 -0.2657 + 0.4424i -0.2657 - 0.4424i
0.9056 -0.1591 - 0.2988i -0.1591 + 0.2988i
State-Space Model is:

a=
x1 x2 x3
x1 0 1 0
x2 0 0 1
x3 -1 -2 -3

b=
u1
x1 0
x2 0
x3 1

c=
x1 x2 x3
y1 1 0 0

d=
u1
y1 0

Continuous-time model.
Characteristic Polynomial:
ans =
s^3+3*s^2+2*s+1

74
Equivalent Transfer Function Model is:
Transfer function:
1.776e-015 s^2 + 6.661e-016 s + 1
---------------------------------
s^3 + 3 s^2 + 2 s + 1

Pole, Zero Form:

Zero/pole/gain:
1.7764e-015 (s^2 + 0.375s + 5.629e014)
---------------------------------------
(s+2.325) (s^2 + 0.6753s + 0.4302)

The numerator is basically equal to 1

Use the same procedure for other parts.


(b) (1) Eigenvalues of A: −1, − 1.

(2) Transfer function relation:

 1 
1 s + 1 1  0  ( s + 1)2 
X( s ) = ( sI − A ) BU ( s ) =
−1
=   U (s) ( s ) = s + 2s + 1
2

 ( s )  0 s + 1 1 
U ( s )
 1 
 ( s + 1) 
 

(3) Output transfer function:


 1 
Y (s)  ( s + 1)2  1 1 s+2
= C( s ) ( sI − A ) B = 1 1  =
−1
+ =
 1  ( s + 1) s + 1 ( s + 1)
2 2
U (s)
 s + 1 

(c) (1) Eigenvalues of A: 0, − 1, − 1.

(2) Transfer function relation:

75
 s 2 + 2s = 1 s+2 1  0  1
1    1  
X( s ) = ( sI − A ) BU ( s ) =
−1

( s) 
0 s ( s + 2) ) s 0 U ( s ) =
  s U ( s)
( s)  2 
( 2
)
( s ) = s s + 2 s + 1
 0 −s s  1 
2
 s 

(3) Output transfer function:


1
s +1
= C( s ) ( sI − A ) B = 1 1 0   s  =
Y ( s) −1 1
=
U (s)  2  s ( s + 1) s ( s + 1)
2

 s 

3-42. Given the dynamic equations of a time-invariant system:


dx ( t )
= Ax ( t ) + Bu ( t ) y ( t ) = Cx ( t )
dt
where
0 1 0 0 
 
A =  0 0 1  B = 0  C = 1 1 0
 −1 −2 −3 1 

Find the matrices A1 and B1 so that the state equations are written as
dx ( t )
= A1x ( t ) + B1u ( t )
dt
where
 
 x (t ) 
 1 
x (t ) =  y (t ) 
 dy t 
 ( )
 dt 
2
dy dx1 dx 2 d y dx 2 dx3
We write = + = x 2 + x3 = + = − x1 − 2 x 2 − 2 x3 + u
dt dt dt dt dt dt

76
 dx1 
 dt 
   0 1 0   x1   0 
d x  dy  
= = 0 1 1   x2  +  0  u (1)
dt  dt      
 2   −1 −2 −2   x3  1 
d y
 dt 2 

 x1  1 0 0   1 0 0
x =  y  = 1 1 0  x x =  −1 1 0  x (2)
     
 y  0 1 1   1 −1 1 

Substitute Eq. (2) into Eq. (1), we have

 −1 1 0  0 
 
= A 1 x + B1 u = 0 0 1 x =  0  u
dx
dt    
 −1 0 −2  1 

3-43. Fig. 3P-43(a) shows a well-known “broom-balancing” system in control


systems. The objective of the control system is to maintain the broom in the
upright position by means of the force u(t) applied to the car as shown. In practical
applications, the system is analogous to a one-dimensional control problem of the
balancing of a unicycle or a missile immediately after launching. The free-body
diagram of the system is shown in Fig. 3P-43(b), where

Figure 3P-43
fx = force at broom base in horizontal direction
fy = force at broom base in vertical direction
Mb = mass of broom
77
g = gravitational acceleration
Mc = mass of car

Jb = moment of inertia of broom about center of gravity CG = M b L2 /3


(a) Write the force equations in the x and the y directions at the pivot
point of the broom. Write the torque equation about the center of gravity CG of the
broom. Write the force equation of the car in the horizontal direction.
(b) Express the equations obtained in part (a) as state equations by
assigning the state variables as x1 =  , x2 = d /dt , x3 = x,and x4 = dx/dt . Simplify
these equations for small  by making the approximations sin    and cos  1 .
(c) Obtain a small-signal linearized state-equation model for the system
in the form of
d x ( t )
= A*x ( t ) + B*r ( t )
dt
x01 ( t ) = 1, x02 ( t ) = 0, x03 ( t ) = 0 x04 ( t ) = 0
at the equilibrium point , and .
(a) Nonlinear differential equations:
dx ( t ) dv ( t )
= v (t ) = − k ( v ) − g ( x ) + f ( t ) = − Bv ( t ) + f ( t )
dt dt
With Ra = 0 ,
e( t ) e( t 0
 (t ) = = K f i f ( t ) = K f i f ( t ) = K f ia ( t ) Then, ia ( t ) =
Kb v ( t ) Kb K f v ( t )

2
Ki e ( t ) dv ( t ) Ki
f ( t ) = Ki ( t )ia ( t ) =
2
2 2
. Thus, = − Bv ( t ) + 2 2
e (t )
Kb K f v (t ) dt Kb K f v (t )

(b) State equations: ia (t ) as input.


dx ( t ) dv ( t ) 2
= v (t ) = − Bv ( t ) + Ki K f ia ( t )
dt dt

(c) State equations:  (t ) as input.


2  (t )
f ( t ) = Ki K f ia ( t ) ia ( t ) = i f ( t ) =
Kf

dx ( t ) dv ( t ) Ki
 (t )
2
= v(t ) = − Bv ( t ) +
dt dt Kf

78
3-44. The “broom-balancing” control system described in Problem 3-43 has the
following parameters:
M b = 1kg M c = 10 kg L = 1m g = 32.2 ft / sec 2

The small-signal linearized state equation model of the system is


x ( t ) = A * x ( t ) + B * r ( t )

where
 0 1 0 0  0 
 25.92 0 0 
0  −0.0732 
A* =  B* =  
 0 0 0 1  0 
   
 −2.36 0 0 0  0.0976 
Find the characteristic equation of A* and its roots.
3-45. Fig. 3P-45 shows the schematic diagram of a ball-suspension control system.
The steel ball is suspended in the air by the electromagnetic force generated by the
electromagnet. The objective of the control is to keep the metal ball suspended at
the nominal equilibrium position by controlling the current in the magnet with the
voltage e(t). The practical application of this system is the magnetic levitation of
trains or magnetic bearings in high-precision control systems. The resistance of the
coil is R, and the inductance is L(y) = L/y(t), where L is a constant. The applied
voltage e(t) is a constant with amplitude E.
(a) Let Eeq be a nominal value of E. Find the nominal values of y(t) and
dy(t)/dt at equilibrium.
x1 ( t ) = i ( t ) , x2 ( t ) = y ( t ) , and x3 ( t ) = dy ( t ) / dt
(b) Define the state variables at .
dx ( t )
= f ( x, e )
Find the nonlinear state equations in the form of dt .
(c) Linearize the state equations about the equilibrium point and express the
linearized state equations as
d x ( t )
= A*x ( t ) + B*e ( t )
dt
The force generated by the electromagnet is Ki2(t)/y(t), where K is a proportional
constant, and the gravitational force on the steel ball is Mg.

79
Figure 3P-45
 L
23 (a) Differential equations:  L( y ) = 
 y

d L( y ) i ( t ) dL( y ) dy ( t ) L di( t ) L dy ( t ) L di( t )


e( t ) = Ri ( t ) + = Ri ( t ) + i ( t ) + = Ri ( t ) − 2
i( t ) +
dt dy dt y dt y dt y dt
2 2
Ki ( t ) di( t ) dy ( t ) d y (t )
My( t ) = Mg − 2
At equilibrium, = 0, = 0, 2
=0
y (t ) dt dt dt
Eeq dyeq Eeq K
Thus, ieq = =0 yeq =
R dt R Mg
dy
(b) Define the state variables as x1 = i, x 2 = y, and x3 = .
dt
Eeq Eeq K
Then, x1eq = x 2eq = x3eq = 0
R R Mg

The differential equations are written in state equation form:


2
dx1 R x1x3 x2 dx 2 dx3 K x1
=− x1x 2 + + e = f1 = x3 = f 2 = g− 2
= f3
dt L x2 L dt dt M x2

(c) Linearization:

f1 R x3eq Eeq K f1 R x1 x3 Eeq f1 x1eq Mg


=− x 2eq + =− =− x1eq − + =0 = =
x1 x 2 x3
2
L x 2eq L Mg L x2 L x 2eq K

80
f1 x 2eq 1 K Eeq f 2 f 2 f 2 f 2
= = =0 =0 =1 =0
e L L Mg R x1 x 2 x3 e
2
f 3 2 K x1eq 2 Rg f 3 2 K x1eq 2 Rg Mg f 3
=− =− = = =0
x1 x 2 e
2 3
M x 2eq Eeq M x 2eq Eeq K

The linearized state equations about the equilibrium point are written as:
 
x = A x + B e

 Eeq K Mg  Eeq K 


− 0   
 L Mg K 
 RL Mg 
A = 0  B = 
 
0 0 0
   
 2 Rg 2 Rg Mg   0 
 − E 0   
 eq
Eeq K   

3-46. The linearized state equations of the ball-suspension control system


described in Problem 3-45 are expressed as
x ( t ) = A * x ( t ) + B * i ( t )

where
 0 1 0 0   0 
115.2 −0.05 −18.6 0   −6.55
A* =  B* =  
 0 0 0 1   0 
   
 −37.2 0 37.2 −0.1  −6.55
Let the control current Δi(t) be derived from the state feedback Δi(t) = −KΔx(t),
where
K =  k1 k2 k3 k4 

(a) Find the elements of K so that the eigenvalues of A* − B*K


are at −1 + j, −1 − j, −10, and −10.
(b) Plot the responses of Δx1(t) = Δy1(t) (magnet displacement)
and Δx3(t) = Δy2(t) (ball displacement) with the initial condition
0.1
0
x ( 0 ) =  
0
 
0
(c) Repeat part (b) with the initial condition

81
0
0
x ( 0 ) =  
0.1
 
0
Comment on the responses of the closed-loop system with the two
sets of initial conditions used in (b) and (c).

The solutions using MATLAB


(a) The feedback gains, from k1 to k2:

−6.4840E+01 −5.6067E+00 2.0341E+01 2.2708E+00

The A − B K matrix of the closed-loop system

0.0000E+00 1.0000E+00 0.0000E+00 0.0000E+00


−3.0950E+02 −3.6774E+01 1.1463E+02 1.4874E+01
0.0000E+00 0.0000E+00 0.0000E+00 1.0000E+00
−4.6190E+02 −3.6724E+01 1.7043E+02 1.477eE+01

The B vector

0.0000E+00
−6.5500E+00
0.0000E+00
−6.5500E+00

'
(b) Time Responses: x(0) = 01
. 0 0 0

82
'
With the initial states x(0) = 01. 0 0 0 , the initial position of x1 or y1 is
perturbed downward from its stable equilibrium position. The steel ball is initially
pulled toward the magnet, so x3 = y2 is negative at first. Finally, the feedback
control pulls both bodies back to the equilibrium position. With the initial states
'
x(0) = 0 0 01
. 0 , the initial position of x3 or y2 is perturbed downward from its
stable equilibrium. For t > 0, the ball is going to be attracted up by the magnet
toward the equilibrium position. The magnet will initially be attracted toward the
fixed iron plate, and then settles to the stable equilibrium position. Since the steel
ball has a small mass, it will move more actively.

83

You might also like